fixing output file name generetion