code: function scanErr(err, pathname) {
      log.debug(err);
      if ('ENOENT' === err.code) {
          callback(pathname + ' does not exist.');
      } else {
          callback('Unexpected error.');
      }
  
      // cli does process.exit() in callback, but unit tests don't.
      callback = function () {};
  }
docs: scanfs error callback