To prevent partial or corrupt files on download failure, write the decompressed
stream to a temporary file first, and then atomically move it to the final
destination upon success.
In TryDownloadGzipToFile, modify the catch block to log the exception details
before returning false, instead of silently swallowing the error.