Fix file check