It worked but I agree, I've added ```(.getAbsolutePath() tempfile)``` as the path might change on different environments.