make sure the gzip stream is closed before dumping it
more specs for merging specs