docs: function yamlFileSet(file, keyPath, value, options) {
    if (_.isPlainObject(keyPath)) { // key is keyMapping
      if (!_.isUndefined(options)) {
        throw new Error('Wrong parameters. Cannot specify a keymapping and a value at the same time.');
      }
      if (_.isPlainObject(value)) {
        options = value;
        value = null;
      } else {
        options = {};
      }
    } else if (!_.isString(keyPath) && !_.isArray(keyPath)) {
      throw new Error('Wrong parameter `keyPath`.');
    }
    options = _.sanitize(options, {encoding: 'utf-8', retryOnENOENT: true});
    if (!exists(file)) {
      touch(file);
    }
  
    let content = yaml.safeLoad(read(file, _.pick(options, 'encoding')));
    if (_.isUndefined(content)) {
      content = {};
    }
    content = _setValue(content, keyPath, value);
    write(file, yaml.safeDump(content), options);
  }