fixing log levels
implemented auto-reconnect