Use Paths.get(...) instead of File.toPath()