Fix problem with treating ENOENT as an error