Improved gzip error handling