gzip output; get basename of input files