fix the problem that output file name twice