formatting the outfile name as well