@Override
 public void exportCSV(String outputFile) {
   List<Schedule> data = getSchedule();
   FileWriter fileWriter = null;
   CSVPrinter csvFilePrinter = null;
   try {
     fileWriter = new FileWriter(outputFile);
     csvFilePrinter = new CSVPrinter(fileWriter, CSVFormat.DEFAULT.withRecordSeparator("\n"));
     for (int i = 0; i < data.size(); i++) {
       List<Object> line = new ArrayList<>();
       for (Field field : Schedule.class.getDeclaredFields()) {
         field.setAccessible(true);
         Object value = field.get(data.get(i));
         line.add(value);
       }
       csvFilePrinter.printRecord(line);
     }
   } catch (IOException | IllegalAccessException e) {
     e.printStackTrace();
   } finally {
     try {
       if (fileWriter != null) {
         fileWriter.flush();
         fileWriter.close();
       }
       if (csvFilePrinter != null) {
         csvFilePrinter.close();
       }
     } catch (IOException e) {
       e.printStackTrace();
     }
   }
 }
 /**
  * Registers all listener found in the specified directory.
  *
  * @param path The path to the directory containing the listeners
  * @param origin The origin to register all found listeners to
  */
 @Override
 public void registerListeners(String path, Plugin origin) {
   try {
     for (ClassPath.ClassInfo classInfo :
         ClassPath.from(origin.getClass().getClassLoader()).getTopLevelClasses(path)) {
       Class<?> clazz = classInfo.load();
       if (MessageListener.class.isAssignableFrom(clazz)) {
         this.registerListener((MessageListener) clazz.newInstance(), origin);
         origin.getLogger().info("Registered plugin message listener: " + clazz.getName());
       }
     }
   } catch (IOException | IllegalAccessException | InstantiationException e) {
     e.printStackTrace();
   }
 }