`isFile()` is `false` for symlinks. It may be more conservative to require `!file.isDirectory()`, since it seems valid to point to a symlinked config file.