support gzipped argentum output
fix fd leak