Added error checking when setting the certificate to connect to our server.