quick and dirty hack to expose a callback to send data to the web app
Adding logging functionality