Fix an issue where we add extra bytes to the log zip.
(cherry picked from commit 3be85266c463a62ee1a34117e2ffb11bfd2a9838)