private void generateReport() {
    fileWriter = null;
    if ("scenarios".equals(shouldGenerateFile())) fileWriter = new ScenariosFileWriter();
    else if ("html".equals(shouldGenerateFile())) fileWriter = new FreemarkerFileWriter();

    if (fileWriter != null) {
      fileWriter.setOutputFolder(System.getProperty("outputFolder"));
      fileWriter.write(story);
      fileWriter.writeToc(storiesList);
    }
  }
 private String shouldGenerateFile() {
   return System.getProperty(GENERATE_FILES);
 }