Fix the issue: tmp filename is wrong.