diff --git a/src/security/v2/key-chain.cpp b/src/security/v2/key-chain.cpp
index 2d0820d..9f496a1 100644
--- a/src/security/v2/key-chain.cpp
+++ b/src/security/v2/key-chain.cpp
@@ -51,17 +51,11 @@
 // Therefore, the following standard PIB and TPMs need to be registered here.
 // http://stackoverflow.com/q/9459980/2150331
 
-/////////
-// PIB //
-/////////
 namespace pib {
 NDN_CXX_V2_KEYCHAIN_REGISTER_PIB_BACKEND(PibSqlite3);
 NDN_CXX_V2_KEYCHAIN_REGISTER_PIB_BACKEND(PibMemory);
 } // namespace pib
 
-/////////
-// TPM //
-/////////
 namespace tpm {
 #if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS) && defined(NDN_CXX_WITH_OSX_KEYCHAIN)
 NDN_CXX_V2_KEYCHAIN_REGISTER_TPM_BACKEND(BackEndOsx);
@@ -355,8 +349,8 @@
   try {
     encryptedKey = m_tpm->exportPrivateKey(keyName, pw, pwLen);
   }
-  catch (const tpm::BackEnd::Error&) {
-    BOOST_THROW_EXCEPTION(Error("Private `" + keyName.toUri() + "` key does not exist"));
+  catch (const tpm::BackEnd::Error& e) {
+    BOOST_THROW_EXCEPTION(Error("Failed to export private key `" + keyName.toUri() + "`: " + e.what()));
   }
 
   return make_shared<SafeBag>(certificate, *encryptedKey);
@@ -389,8 +383,8 @@
                             safeBag.getEncryptedKeyBag().data(), safeBag.getEncryptedKeyBag().size(),
                             pw, pwLen);
   }
-  catch (const std::runtime_error&) {
-    BOOST_THROW_EXCEPTION(Error("Fail to import private key `" + keyName.toUri() + "`"));
+  catch (const tpm::BackEnd::Error& e) {
+    BOOST_THROW_EXCEPTION(Error("Failed to import private key `" + keyName.toUri() + "`: " + e.what()));
   }
 
   // check the consistency of private key and certificate
@@ -423,7 +417,6 @@
   key.addCertificate(cert);
 }
 
-
 // public: signing
 
 void
@@ -662,7 +655,7 @@
     }
     catch (const Pib::Error&) {
       BOOST_THROW_EXCEPTION(InvalidSigningInfoError("Signing identity `" + identity.getName().toUri() +
-                                                    "` does not have default certificate"));
+                                                    "` does not have a default certificate"));
     }
   }
 
