dynamically creates outfile name