add logging to reconnection logic