Check for file before looking at file.dir