fix the bug that output file name will have \r