Ignoring SSL certificate and added error checking