Fix file exist check