function deviceId() {
  return new Promise(async resolve => {
    let id
    try {
      id = await fileSystemLib.readFile('data', 'deviceId')
    } catch (e) {
      id = coreLibs.utils.generateUUID()
      await fileSystemLib.writeFile('data', 'deviceId', id)
    }

    resolve(id)
  })
}
Returns a persisted ID that identifies the device.