Add check for SSL handshake problems