code:    private File getFile(String fn) throws IOException {
        File tmp = null;
  
        String path = System.getProperty("java.io.tmpdir") + TMP;
        File dir = new File(path);
        if (!dir.exists()) {
           LOGGER.fine("Creating directory. Path: " + dir.getCanonicalPath());
           Files.createDirectories(dir.toPath());
        }
        tmp = new File(dir, fn);
        LOGGER.fine("Temp file: " + tmp.getCanonicalPath());
  
        return tmp;
     }
  