docs: function getDir (config, name) {
      var base = config.base
      // get list of directories for name
      var dirs = config.dir[name]
      // make sure dirs is array
      if (!Array.isArray(dirs)) {
          dirs = dirs
      }
      // default dir is app base + dir name
      var defaultDir = base+'/'+name
      // if default dir exists then add it
      try {
          // will throw error if dir does not exists
          fs.statSync(defaultDir)
          // add default dir
          dirs.push(defaultDir)
      }
      // ignore errors
      catch (err) {}
      // get only the directories that exist
      config.dir[name] = _.filter(dirs, dir => {
          // if dir is relative then get abs from base
          if (!path.isAbsolute(dir)) {
              // get abs path from base and dir
              dir = base+'/'+dir
          }
          // stat dir
          try {
              var stat = fs.statSync(dir)
          }
          // throw error
          catch (err) {
              throw new Error(name+' dir error: '+err.message)
          }
          // debug
          debug('get dir %s: %s', name, stat ? dir : 'error')
          // return dir if exists or undefined
          return stat ? true : false
      })
      // return directories
      return config.dir[name]
  }