Avoid errors and warnings when attempting to do I/O on zero bytes