check file exists bug fixed