Add logging to troubleshoot connection testing