public static void writeArxFile(HashMap<String, String> map, File dest) {

        try {
            if (!dest.exists()) {
                dest.mkdirs();
                dest.createNewFile();
            }

            String output = "";
            Set<String> keySet = map.keySet();
            String[] keys = keySet.toArray(new String[0]);
            System.out.println(keys.toString());

            for (String key : keys) {

                output += key + ": " + map.get(key) + "\n";

            }
            FileWriter fw = new FileWriter(dest);
            fw.write(output);
            fw.close();
        } catch (IOException ioe) {
            Log.error("Cannot write Arx file: '" + dest.getName() + "'\nReason: " + ioe.getMessage());
        }
    }