close gzip stream in finally