fix file exists bug