Add more logging to connection handling