diff --git a/src/profile.cpp b/src/profile.cpp
index dc89fa9..06cb1e5 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -10,7 +10,6 @@
  */
 
 #include "profile.hpp"
-#include "logging.h"
 #include <ndn-cxx/security/additional-description.hpp>
 
 namespace chronochat {
@@ -149,45 +148,43 @@
   m_wire.parse();
 
   if (m_wire.type() != tlv::Profile)
-    throw Error("Unexpected TLV number when decoding profile packet");
+    NDN_THROW(Error("Unexpected TLV number when decoding profile packet"));
 
   Block::element_const_iterator i = m_wire.elements_begin();
   if (i == m_wire.elements_end())
-    throw Error("Missing Profile Entry");
+    NDN_THROW(Error("Missing Profile Entry"));
   if (i->type() != tlv::ProfileEntry)
-    throw Error("Expect Profile Entry but get TLV Type " + std::to_string(i->type()));
+    NDN_THROW(Error("Expect Profile Entry but get TLV Type " + std::to_string(i->type())));
 
   while (i != m_wire.elements_end() && i->type() == tlv::ProfileEntry) {
     Block temp = *i;
     temp.parse();
     Block::element_const_iterator j = temp.elements_begin();
     if (j == temp.elements_end())
-      throw Error("Missing Oid");
+      NDN_THROW(Error("Missing Oid"));
     if (j->type() != tlv::Oid)
-      throw Error("Expect Oid but get TLV Type" + std::to_string(j->type()));
+      NDN_THROW(Error("Expect Oid but get TLV Type" + std::to_string(j->type())));
 
     string Oid = std::string(reinterpret_cast<const char* >(j->value()),
                              j->value_size());
     ++j;
     if (j == temp.elements_end())
-      throw Error("Missing EntryData");
+      NDN_THROW(Error("Missing EntryData"));
     if (j->type() != tlv::EntryData)
-      throw Error("Expect EntryData but get TLV Type " + std::to_string(j->type()));
+      NDN_THROW(Error("Expect EntryData but get TLV Type " + std::to_string(j->type())));
 
     string EntryData = std::string(reinterpret_cast<const char* >(j->value()),
                                    j->value_size());
     ++j;
-    if (j != temp.elements_end()) {
-      throw Error("Unexpected element");
-    }
+    if (j != temp.elements_end())
+      NDN_THROW(Error("Unexpected element"));
+
     m_entries[Oid] = EntryData;
     ++i;
   }
 
-  if (i != m_wire.elements_end()) {
-      throw Error("Unexpected element");
-  }
-
+  if (i != m_wire.elements_end())
+      NDN_THROW(Error("Unexpected element"));
 }
 
 bool
