add a file exist check