public static void main(String[] args) throws java.io.IOException {
        responseSocket = new ServerSocket(1250);
        socket = new DatagramSocket(4445);
        group = InetAddress.getByName("224.0.1.0");
        if (!new File(taskList).isFile()) {
            fw = new FileWriter(taskList);
            fw.write("");
            fw.close();
        }
        fr = new FileReader(taskList);
        br = new BufferedReader(fr);
        CoordinatorGUI gui = new CoordinatorGUI();
        gui.setVisible(true);
        String nodesText = JOptionPane.showInputDialog("Input number of nodes:");
        nodes = Integer.parseInt(nodesText);

        try {

            CoordinatorGUI.textArea.append("Initializing in 5 seconds..." + "\n" + "\n");
            sleep(5000);
            CoordinatorGUI.textArea.append("Starting two-phase commit protocol..." + "\n" + "\n");

            while (abortCounter < maxAborts && !commit) {
                CoordinatorGUI.textArea.append("Commencing preparation phase..." + "\n" + "\n");
                prepareNodes();
            }

            if (commit) {
                commit();
            } else {
                CoordinatorGUI.textArea.append("Commenizing completion phase with failures..." + "\n" + "\n");
                abort();
            }
        } catch (InterruptedException e) {
            System.err.println(e);
        } finally {
            socket.close();
        }
    }