Change file.toPath -> getAbsolutePath (former doesn't exist on Java 6 I think)