   setupDevice: (device, callback) =>
     debug 'setupDevice', {uuid: device.uuid, name: device.name}
 
-    devicePath = path.join @config.devicePath, device.uuid
+    devicePath = @getDevicePath device
     connectorPath = path.join @config.tmpPath, 'node_modules', device.connector
 
     debug 'path', devicePath

    debug 'requesting device', deviceUrl, 'auth:', authHeaders

    request url: deviceUrl, headers: authHeaders, json: true, (error, response, body) =>
      debug "deviceExists response:", body
      return callback(error, null) if error? || body.error?
      device = _.extend {}, body.devices[0], device
      debug 'device exists', device.name
      callback null, device

  startDevice : (device, callback=->) =>
    debug 'startDevice', { name: device.name, uuid: device.uuid}
    devicePath = path.join @config.devicePath, device.uuid
    @writeMeshbluJSON devicePath, device

    pathSep = ':'

      silent: true
      options: []
      cwd: devicePath
      logFile: path.join devicePath, 'forever.log'
      outFile: path.join devicePath, 'forever.stdout'
      errFile: path.join devicePath, 'forever.stderr'
      command: 'node'
      checkFile: false

