code: function logfile(val) {
    var fd;
    // empty string disables use of log file
    if(val) {
      try {
        fd = fs.openSync(val, 'a');
        fs.closeSync(fd);
      }catch(e) {
        throw new Error(util.format('Can\'t open the log file: %s', val));
      }
    }
  }
docs: Validate a logfile value.