Working reconnecting & improved logging