Change input file name according to format