code: function(info, file, opts) {
    if (typeof opts == 'boolean') { // old arugment backup
      opts = {backup: opts};
    }
    opts = opts || {};
    var err = null;
    try {
      ensureDirectoryExists(path.dirname(file));
      if (opts.backup && fileExists(file)) {
        fs.renameSync(file, file + '.bak');
      }
      jsonfile.writeFileSync(file, info, { spaces: 2 });
    } catch (e) {
      err = e;
    }
    return err;
  }
docs: opts: { backup: Boolean // create .bak file }