Using appmessages & pouchdb to log data