r97: Fixed problem of "failed write" when the output is empty by design.