Fix file does not exist error checking