Handle pending close for zlib streams. Lots of debug println