diff --git a/ccnx/ccnx-wrapper.cpp b/ccnx/ccnx-wrapper.cpp
index 697901c..bdb40e7 100644
--- a/ccnx/ccnx-wrapper.cpp
+++ b/ccnx/ccnx-wrapper.cpp
@@ -205,15 +205,24 @@
 int
 CcnxWrapper::putToCcnd (const Bytes &contentObject)
 {
+  _LOG_TRACE (">> putToCcnd");
   UniqueRecLock lock(m_mutex);
   if (!m_running || !m_connected)
-    return -1;
+    {
+      _LOG_TRACE ("<< not running or connected");
+      return -1;
+    }
 
 
   if (ccn_put(m_handle, head(contentObject), contentObject.size()) < 0)
   {
+    _LOG_ERROR ("ccn_put failed");
     // BOOST_THROW_EXCEPTION(CcnxOperationException() << errmsg_info_str("ccnput failed"));
   }
+  else
+    {
+      _LOG_DEBUG ("<< putToCcnd");
+    }
 
   return 0;
 }
@@ -238,24 +247,29 @@
                  ccn_upcall_info *info)
 {
   CcnxWrapper::InterestCallback *f = static_cast<CcnxWrapper::InterestCallback*> (selfp->data);
+  _LOG_TRACE (">> incomingInterest upcall");
 
   switch (kind)
     {
     case CCN_UPCALL_FINAL: // effective in unit tests
       delete f;
       delete selfp;
+      _LOG_TRACE ("<< incomingInterest with CCN_UPCALL_FINAL");
       return CCN_UPCALL_RESULT_OK;
 
     case CCN_UPCALL_INTEREST:
       break;
 
     default:
+      _LOG_TRACE ("<< incomingInterest with CCN_UPCALL_RESULT_OK");
       return CCN_UPCALL_RESULT_OK;
     }
 
   Name interest(info->interest_ccnb, info->interest_comps);
 
   (*f) (interest);
+
+  _LOG_TRACE ("<< incomingInterest");
   return CCN_UPCALL_RESULT_OK;
 }
 
@@ -265,6 +279,7 @@
              ccn_upcall_info *info)
 {
   Closure *cp = static_cast<Closure *> (selfp->data);
+  _LOG_TRACE (">> incomingData upcall");
 
   switch (kind)
     {
@@ -272,6 +287,7 @@
       delete cp;
       cp = NULL;
       delete selfp;
+      _LOG_TRACE ("<< incomingData with CCN_UPCALL_FINAL");
       return CCN_UPCALL_RESULT_OK;
 
     case CCN_UPCALL_CONTENT:
@@ -280,6 +296,7 @@
     case CCN_UPCALL_INTEREST_TIMED_OUT: {
       if (cp != NULL)
       {
+        _LOG_TRACE ("<< incomingData timeout");
         Name interest(info->interest_ccnb, info->interest_comps);
         Closure::TimeoutCallbackReturnValue rv = cp->runTimeoutCallback(interest);
         switch(rv)
@@ -289,6 +306,10 @@
           default : break;
         }
       }
+      else
+        {
+          _LOG_TRACE ("<< incomingData timeout, but callback is not set...");
+        }
       return CCN_UPCALL_RESULT_OK;
     }
 
@@ -314,14 +335,20 @@
 
   cp->runDataCallback (pco->name (), pco);
 
+  _LOG_TRACE (">> incomingData");
+
   return CCN_UPCALL_RESULT_OK;
 }
 
 int CcnxWrapper::sendInterest (const Name &interest, const Closure &closure, const Selectors &selectors)
 {
+  _LOG_TRACE (">> sendInterest");
   UniqueRecLock lock(m_mutex);
   if (!m_running || !m_connected)
-    return -1;
+    {
+      _LOG_ERROR ("<< sendInterest: not running or connected");
+      return -1;
+    }
 
   CcnxCharbufPtr namePtr = interest.toCcnxCharbuf();
   ccn_charbuf *pname = namePtr->getBuf();
@@ -341,13 +368,17 @@
 
   if (ccn_express_interest (m_handle, pname, dataClosure, templ) < 0)
   {
+    _LOG_ERROR ("<< sendInterest: ccn_express_interest FAILED!!!");
   }
 
+  _LOG_TRACE ("<< sendInterest");
+
   return 0;
 }
 
 int CcnxWrapper::setInterestFilter (const Name &prefix, const InterestCallback &interestCallback)
 {
+  _LOG_TRACE (">> setInterestFilter");
   UniqueRecLock lock(m_mutex);
   if (!m_running || !m_connected)
     return -1;
@@ -361,9 +392,12 @@
   int ret = ccn_set_interest_filter (m_handle, pname, interestClosure);
   if (ret < 0)
   {
+    _LOG_ERROR ("<< setInterestFilter: ccn_set_interest_filter FAILED");
   }
 
   m_registeredInterests.insert(pair<Name, InterestCallback>(prefix, interestCallback));
+  
+  _LOG_TRACE ("<< setInterestFilter");
 
   return ret;
 }
@@ -371,6 +405,7 @@
 void
 CcnxWrapper::clearInterestFilter (const Name &prefix)
 {
+  _LOG_TRACE (">> clearInterestFilter");
   UniqueRecLock lock(m_mutex);
   if (!m_running || !m_connected)
     return;
@@ -384,6 +419,8 @@
   }
 
   m_registeredInterests.erase(prefix);
+
+  _LOG_TRACE ("<< clearInterestFilter");
 }
 
 Name
