private void printToFile() throws IOException {
        // Writes the current state of the ContactManager to a CSV File.
        BufferedWriter CSVFile = new BufferedWriter(new FileWriter(fileName));
        for(Contact eachContact : allContacts) {
            CSVFile.write("contact,"+eachContact.getId()+","+eachContact.getName()+","+eachContact.getNotes()+"\n");
        }
        for(Meeting eachMeeting : allMeetings) {
            if(eachMeeting instanceof PastMeeting) {
                PastMeeting eachPastMeeting = (PastMeeting) eachMeeting;
                CSVFile.write("pastmeeting,"+eachPastMeeting.getId()+","+serialDate(eachPastMeeting.getDate())+
                    ","+serialContactSet(eachPastMeeting.getContacts())+","+eachPastMeeting.getNotes()+"\n");
            } else {
                CSVFile.write("meeting,"+eachMeeting.getId()+","+serialDate(eachMeeting.getDate())+
                    ","+serialContactSet(eachMeeting.getContacts())+"\n");
            }
        }
        CSVFile.close();
    }