v0.2.2 Added error handling and automated reconnect and connected event