Shouldn't this be `new File(file.toString).getCanonicalPath` ?