Reconnect handling and logging fixes