function done(argv) {

  var outputYAML = '';

  // Add config parent element
  outputYAML += '# The configurations that used for the recording, feel free to edit them\n';
  outputYAML += 'config:\n\n';

  // Add the configurations with indentation
  outputYAML += config.raw.replace(/^/gm, '  ');

  // Add the records
  outputYAML += '\n# Records, feel free to edit them\n';
  outputYAML += di.yaml.dump({records: records});

  // Store the data into the recording file
  try {

    di.fs.writeFileSync(recordingFile, outputYAML, 'utf8');

  } catch (error) {

    return di.errorHandler(error);

  }

  console.log(di.chalk.green('Successfully Recorded'));
  console.log('The recording data is saved into the file:');
  console.log(di.chalk.magenta(recordingFile));
  console.log('You can edit the file and even change the configurations.');
  console.log(
    "The command " +
      di.chalk.magenta("`terminalizer share`") +
      "can be used anytime to share recordings!"
  );

  // Reset STDIN
  process.stdin.setRawMode(false);
  process.stdin.pause();

  if (argv.skipSharing) {
    return
  }

  di.inquirer.prompt([
    {
      type: "confirm",
      name: "share",
      message: "Would you like to share your recording on www.terminalizer.com?",
    },
  ]).then(function(answers) {

    if (!answers.share) {
      return;
    }

    console.log(
      di.chalk.green(
        "Let's now share your recording on https://www.terminalizer.com"
      )
    );

    // Invoke the share command
    di.commands.share.handler({
      recordingFile: recordingFile,
    });
  });

}
Executed after the command completes its task
Store the output file with reserving the comments

@param {Object} argv