Add checks and various adjustments to help troubleshoot SSL handshake issue.