Fixed handling of 0-byte files