added tls clientError event handler