diff --git a/src/hello-protocol.cpp b/src/hello-protocol.cpp
index b10afb0..684009d 100644
--- a/src/hello-protocol.cpp
+++ b/src/hello-protocol.cpp
@@ -66,6 +66,7 @@
       interestName.append(m_nlsr.getConfParameter().getRouterPrefix().wireEncode());
       expressInterest(interestName,
                       m_nlsr.getConfParameter().getInterestResendTime());
+      _LOG_DEBUG("Sending scheduled interest: " << interestName);
     }
     // If it does not have a Face, we need to give it one.  A
     // successful registration prompts a callback that sends the hello
@@ -95,6 +96,8 @@
   const ndn::Name interestName = interest.getName();
   _LOG_DEBUG("Interest Received for Name: " << interestName);
   if (interestName.get(-2).toUri() != INFO_COMPONENT) {
+    _LOG_DEBUG("INFO_COMPONENT not found or interestName: " << interestName
+               << " does not match expression");
     return;
   }
   ndn::Name neighbor;
@@ -109,7 +112,7 @@
     m_nlsr.getKeyChain().sign(*data, m_nlsr.getDefaultCertName());
     _LOG_DEBUG("Sending out data for name: " << interest.getName());
     m_nlsr.getNlsrFace().put(*data);
-    Adjacent *adjacent = m_nlsr.getAdjacencyList().findAdjacent(neighbor);
+    Adjacent* adjacent = m_nlsr.getAdjacencyList().findAdjacent(neighbor);
     // If this neighbor was previously inactive, send our own hello interest, too
     if (adjacent->getStatus() == Adjacent::STATUS_INACTIVE) {
       // We can only do that if the neighbor currently has a face.
@@ -157,6 +160,7 @@
     interestName.append(NLSR_COMPONENT);
     interestName.append(INFO_COMPONENT);
     interestName.append(m_nlsr.getConfParameter().getRouterPrefix().wireEncode());
+    _LOG_DEBUG("Resending interest: " << interestName);
     expressInterest(interestName,
                     m_nlsr.getConfParameter().getInterestResendTime());
   }
@@ -164,6 +168,8 @@
            (infoIntTimedOutCount == m_nlsr.getConfParameter().getInterestRetryNumber())) {
     m_nlsr.getAdjacencyList().setStatusOfNeighbor(neighbor, Adjacent::STATUS_INACTIVE);
 
+    _LOG_DEBUG("Neighbor: " << neighbor << " status changed to INACTIVE");
+
     m_nlsr.getLsdb().scheduleAdjLsaBuild();
   }
 }
@@ -250,7 +256,7 @@
 HelloProtocol::onRegistrationSuccess(const ndn::nfd::ControlParameters& commandSuccessResult,
                                      const ndn::Name& neighbor,const ndn::time::milliseconds& timeout)
 {
-  Adjacent *adjacent = m_nlsr.getAdjacencyList().findAdjacent(neighbor);
+  Adjacent* adjacent = m_nlsr.getAdjacencyList().findAdjacent(neighbor);
   if (adjacent != 0) {
     adjacent->setFaceId(commandSuccessResult.getFaceId());
     ndn::Name broadcastKeyPrefix = DEFAULT_BROADCAST_PREFIX;
@@ -290,7 +296,7 @@
   * Lsa unless all the neighbors are ACTIVE or DEAD. For considering the
   * missconfigured(link) neighbour dead this is required.
   */
-  Adjacent *adjacent = m_nlsr.getAdjacencyList().findAdjacent(name);
+  Adjacent* adjacent = m_nlsr.getAdjacencyList().findAdjacent(name);
   if (adjacent != 0) {
     adjacent->setInterestTimedOutNo(adjacent->getInterestTimedOutNo() + 1);
     Adjacent::Status status = adjacent->getStatus();
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index 1d20d72..8468947 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -120,6 +120,7 @@
   }
   else if (seqNo > m_highestSeqNo[lsaName]) {
     m_highestSeqNo[lsaName] = seqNo;
+    _LOG_TRACE("SeqNo for LSA(name): " << data->getName() << "  updated");
   }
   else if (seqNo < m_highestSeqNo[lsaName]) {
     return;
@@ -266,6 +267,7 @@
                           std::inserter(nameToRemove, nameToRemove.begin()));
       for (std::list<ndn::Name>::iterator it = nameToRemove.begin();
            it != nameToRemove.end(); ++it) {
+        _LOG_DEBUG("Removing name LSA no longer advertised: " << (*it).toUri());
         chkNameLsa->removeName((*it));
         if (nlsa.getOrigRouter() != m_nlsr.getConfParameter().getRouterPrefix()) {
           if ((*it) != m_nlsr.getConfParameter().getRouterPrefix()) {
@@ -273,6 +275,7 @@
           }
         }
       }
+
       if (nlsa.getOrigRouter() != m_nlsr.getConfParameter().getRouterPrefix()) {
         ndn::time::system_clock::Duration duration = nlsa.getExpirationTimePoint() -
                                                      ndn::time::system_clock::now();
@@ -578,6 +581,7 @@
 
   if (m_nlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_ON) {
     // Don't build adjacency LSAs in hyperbolic routing
+    _LOG_DEBUG("Adjacency LSA not built. Currently in hyperbolic routing state.");
     return;
   }
 
@@ -842,7 +846,7 @@
       }
       // Since we cannot refresh other router's LSAs, our only choice is to expire.
       else {
-        _LOG_DEBUG("Other's Name LSA, so removing form LSDB");
+        _LOG_DEBUG("Other's Name LSA, so removing from LSDB");
         removeNameLsa(lsaKey);
       }
     }
@@ -860,7 +864,7 @@
 Lsdb::exprireOrRefreshAdjLsa(const ndn::Name& lsaKey, uint64_t seqNo)
 {
   _LOG_DEBUG("Lsdb::exprireOrRefreshAdjLsa Called");
-  _LOG_DEBUG("LSA Key : " << lsaKey << " Seq No: " << seqNo);
+  _LOG_DEBUG("LSA Key: " << lsaKey << " Seq No: " << seqNo);
   AdjLsa* chkAdjLsa = findAdjLsa(lsaKey);
   // If this is a valid LSA
   if (chkAdjLsa != 0) {
@@ -885,7 +889,7 @@
       }
       // An LSA from another router is expiring
       else {
-        _LOG_DEBUG("Other's Adj LSA, so removing form LSDB");
+        _LOG_DEBUG("Other's Adj LSA, so removing from LSDB");
         removeAdjLsa(lsaKey);
       }
       // We have changed the contents of the LSDB, so we have to
@@ -938,7 +942,7 @@
       }
       // We can't refresh other router's LSAs, so we remove it.
       else {
-        _LOG_DEBUG("Other's Cor LSA, so removing form LSDB");
+        _LOG_DEBUG("Other's Cor LSA, so removing from LSDB");
         removeCoordinateLsa(lsaKey);
       }
       if (m_nlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_ON) {
@@ -1031,6 +1035,8 @@
                                 m_nlsr.getKeyChain(),
                                 m_lsaRefreshTime,
                                 content);
+  _LOG_DEBUG("Sending requested data ( " << content << ")  for interest (" << interest
+             << ") to be published and added to face.");
   publisher.publish(interest.getName(),
                     ndn::security::signingByCertificate(m_nlsr.getDefaultCertName()));
 }
@@ -1045,12 +1051,20 @@
                                 const ndn::Name& lsaKey,
                                 uint64_t seqNo)
 {
+
+  _LOG_DEBUG("nameLsa interest " << interest << " received");
   NameLsa*  nameLsa = m_nlsr.getLsdb().findNameLsa(lsaKey);
   if (nameLsa != 0) {
     if (nameLsa->getLsSeqNo() == seqNo) {
       std::string content = nameLsa->getData();
       putLsaData(interest,content);
     }
+    else {
+      _LOG_TRACE("SeqNo for nameLsa does not match");
+    }
+  }
+  else {
+    _LOG_TRACE(interest << "  was not found in this lsdb");
   }
 }
 
@@ -1065,15 +1079,22 @@
                                      uint64_t seqNo)
 {
   if (m_nlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_ON) {
-    _LOG_ERROR("Received interest for an adjacency LSA when hyperbolic routing is enabled.");
+    _LOG_ERROR("Received interest for an adjacency LSA when hyperbolic routing is enabled");
   }
 
+  _LOG_DEBUG("AdjLsa interest " << interest << " received");
   AdjLsa* adjLsa = m_nlsr.getLsdb().findAdjLsa(lsaKey);
   if (adjLsa != 0) {
     if (adjLsa->getLsSeqNo() == seqNo) {
       std::string content = adjLsa->getData();
       putLsaData(interest,content);
     }
+    else {
+      _LOG_TRACE("SeqNo for AdjLsa does not match");
+    }
+  }
+  else {
+    _LOG_TRACE(interest << "  was not found in this lsdb");
   }
 }
 
@@ -1088,15 +1109,22 @@
                                       uint64_t seqNo)
 {
   if (m_nlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_OFF) {
-    _LOG_ERROR("Received Interest for a coordinate LSA when link-state routing is enabled.");
+    _LOG_ERROR("Received Interest for a coordinate LSA when link-state routing is enabled");
   }
 
+  _LOG_DEBUG("CoordinateLsa interest " << interest << " received");
   CoordinateLsa* corLsa = m_nlsr.getLsdb().findCoordinateLsa(lsaKey);
   if (corLsa != 0) {
     if (corLsa->getLsSeqNo() == seqNo) {
       std::string content = corLsa->getData();
       putLsaData(interest,content);
     }
+    else {
+      _LOG_TRACE("SeqNo for CoordinateLsa does not match");
+    }
+  }
+  else {
+    _LOG_TRACE(interest << "  was not found in this lsdb");
   }
 }
 
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 58d5cf7..26276d7 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -312,12 +312,19 @@
       certName = certName.getPrefix(-1);
     }
   else if (certName[-1].toUri() != "ID-CERT")
-    return; //Wrong key interest.
+    {
+      _LOG_DEBUG("certName for interest " << interest << " is malformed,"
+                 << " contains incorrect namespace syntax");
+      return;
+    }
 
   std::shared_ptr<const ndn::IdentityCertificate> cert = getCertificate(certName);
 
   if (!static_cast<bool>(cert))
-    return; // cert is not found
+    {
+      _LOG_DEBUG("cert is not found for " << interest);
+      return; // cert is not found
+    }
 
   std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>();
   data->setName(interestName);
diff --git a/src/route/fib.cpp b/src/route/fib.cpp
index 7c14d78..777ab1b 100644
--- a/src/route/fib.cpp
+++ b/src/route/fib.cpp
@@ -320,6 +320,7 @@
                          const std::string& faceUri,
                          uint8_t times)
 {
+  _LOG_DEBUG("Registering prefix: " << parameters.getName() << " faceUri: " << faceUri);
   m_controller.start<ndn::nfd::RibRegisterCommand>(parameters,
                                                    std::bind(&Fib::onRegistrationSuccess, this, _1,
                                                              "Successful in name registration",
