add some comments, add gzip file suffix to output. TODO: factor out compression and make pluggable in driver class