code: function cleanup_directory(directory_path, callback) {
    // only remove the folder at directory_path if it exists
    fs.exists(directory_path, function (exists) {
      if (!exists) {
        return callback();
      }
      rimraf(directory_path, callback);
    });
  }
docs: Cleanup any single page pdfs on error