public static void saveAccounts() {
        try {
            StringBuilder rawAccs = new StringBuilder();
            File accountsFile = new File(Configuration.ACCOUNTS_DIR + File.separator + "Accounts.txt");
            if (!accountsFile.exists()) {
                accountsFile.createNewFile();
            }
            for (Account account : accounts) {
                rawAccs.append(account.toString());
            }
            BufferedWriter bw = new BufferedWriter(new FileWriter(accountsFile));
            bw.write(rawAccs.toString());
            bw.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }