rescue zlib errors