added error messages for certificate errors