fix file name problem with ~