public static void writeFile (String path, ArrayList<String> contents) {

        if(doesFileExist(path) == false){
            createFile(path);
        }

        File file = new File(path);

        try {

            BufferedWriter writer = new BufferedWriter(new FileWriter(file));

            for(String data : contents){
                writer.write(data);
                writer.newLine();
            }

            writer.close();

        } catch (IOException e) {
            e.printStackTrace();
        }

    }