diff --git a/library/x509_crt.c b/library/x509_crt.c
index 91e4f50..2bae2c9 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -1903,6 +1903,7 @@ static int x509_crt_verify_top(
      * Child is the top of the chain. Check against the trust_ca list.
      */
     *flags |= MBEDTLS_X509_BADCERT_NOT_TRUSTED;
+    printf("Child is the top of the chain\n");
 
     md_info = mbedtls_md_info_from_type( child->sig_md );
     if( md_info == NULL )
@@ -1951,6 +1952,7 @@ static int x509_crt_verify_top(
          * Top of chain is signed by a trusted CA
          */
         *flags &= ~MBEDTLS_X509_BADCERT_NOT_TRUSTED;
+        printf("Top of chain is signed by trusted CA\n");
 
         if( x509_profile_check_key( profile, child->sig_pk, &trust_ca->pk ) != 0 )
             *flags |= MBEDTLS_X509_BADCERT_BAD_KEY;
@@ -2025,6 +2027,7 @@ static int x509_crt_verify_child(
     if( 1 + path_cnt > MBEDTLS_X509_MAX_INTERMEDIATE_CA )
     {
         *flags |= MBEDTLS_X509_BADCERT_NOT_TRUSTED;
+        printf("path_cnt is 0 for the first intermediate CA\n");
         return( MBEDTLS_ERR_X509_CERT_VERIFY_FAILED );
     }
 
@@ -2047,6 +2050,7 @@ static int x509_crt_verify_child(
          * Cannot check 'unknown' hash
          */
         *flags |= MBEDTLS_X509_BADCERT_NOT_TRUSTED;
+        printf("can not check unknown hash\n");
     }
     else
     {
@@ -2060,6 +2064,7 @@ static int x509_crt_verify_child(
                            child->sig.p, child->sig.len ) != 0 )
         {
             *flags |= MBEDTLS_X509_BADCERT_NOT_TRUSTED;
+            printf("mbedtls_pk_verify_ext\n");
         }
     }
 

