Added reconnect
Fixed some debug messages