Use Files.createTempDir() and write to the correct file name (remove rename logic)