code: function cbmain (err, state) {
      var localfile = null
      if (err) {
        if (err.usrmsg) {
          print(err.usrmsg)
          return
        }
        else {
          console.log(err.message)
          return
        }
      }
      if (!isEmpty(state.bins)) {
        localfile = path.join(getActiveBin(state.bins), that.flocal)
      }
      writeState(state, localfile, function (err, status) {
        if (err) throw err
  
      })
    }
docs: ////////////////////////////////// ## MAIN CALLBACK  ## can be overridden for testing //////////////////////////////////