public static void saveDataToFile(File file, String content) throws IOException {
        File storage = getStorageFolder();
        if(!storage.exists()) {
            if(!storage.mkdir()) {
                throw new IOException("Can not create a storage folder " + storage.getAbsolutePath());
            }
        }
        PrintWriter out = null;
        try {
            out = new PrintWriter(new BufferedWriter(new FileWriter(file, false)));
            out.println(content);
        } finally {
            if(out != null) {
                out.close();
            }
        }
    }