The removed code basically says "if the file exists, truncate it to zero length (because we're about to append the compressed data to it)".  This was a pointless check, because creating the file fresh at this point would do no harm anyway.  It would work just as well without the check.

However, in the new code this check would be completely wrong.  We need to set the permission attributes on the temp file through createFileAtPath, and we need to do that whether the file is there already or not.  That's the point of this changeset.