fix bug:double filename when input is file