diff --git a/rib/rib-entry.cpp b/rib/rib-entry.cpp
index 5043233..3e24275 100644
--- a/rib/rib-entry.cpp
+++ b/rib/rib-entry.cpp
@@ -25,8 +25,12 @@
 
 #include "rib-entry.hpp"
 
+#include "core/logger.hpp"
+
 #include <ndn-cxx/management/nfd-control-command.hpp>
 
+NFD_LOG_INIT("RibEntry");
+
 namespace nfd {
 namespace rib {
 
@@ -57,28 +61,11 @@
     }
 }
 
-bool
+void
 RibEntry::eraseFace(const FaceEntry& face)
 {
   RibEntry::iterator it = std::find_if(begin(), end(), bind(&compareFaceIdAndOrigin, _1, face));
-
-  if (it != m_faces.end())
-    {
-      if (it->flags & ndn::nfd::ROUTE_FLAG_CAPTURE)
-        {
-          m_nFacesWithCaptureSet--;
-        }
-
-      //cancel any scheduled event
-      scheduler::cancel(it->getExpirationEvent());
-
-      m_faces.erase(it);
-      return true;
-    }
-  else
-    {
-      return false;
-    }
+  eraseFace(it);
 }
 
 bool
@@ -124,6 +111,10 @@
           m_nFacesWithCaptureSet--;
         }
 
+      //cancel any scheduled event
+      NFD_LOG_TRACE("Cancelling expiration eventId: " << face->getExpirationEvent());
+      scheduler::cancel(face->getExpirationEvent());
+
       return m_faces.erase(face);
     }
 
diff --git a/rib/rib-entry.hpp b/rib/rib-entry.hpp
index fc78624..b17085a 100644
--- a/rib/rib-entry.hpp
+++ b/rib/rib-entry.hpp
@@ -79,9 +79,8 @@
   insertFace(const FaceEntry& face);
 
   /** \brief erases a FaceEntry with the same faceId and origin
-   *  \return{ true if the face is removed, false otherwise }
    */
-  bool
+  void
   eraseFace(const FaceEntry& face);
 
   /** \brief erases a FaceEntry with the passed iterator
diff --git a/rib/rib-manager.cpp b/rib/rib-manager.cpp
index aa859e2..59e6230 100644
--- a/rib/rib-manager.cpp
+++ b/rib/rib-manager.cpp
@@ -286,10 +286,11 @@
 
       // Schedule a new event, the old one will be cancelled during rib insertion.
       EventId eventId;
-      NFD_LOG_TRACE("scheduling unregistration at: " << faceEntry.expires);
       eventId = scheduler::schedule(parameters.getExpirationPeriod(),
-                                    bind(&RibManager::unregisterEntry,
+                                    bind(&RibManager::expireEntry,
                                     this, shared_ptr<Interest>(), parameters));
+      NFD_LOG_TRACE("Scheduled unregistration at: " << faceEntry.expires <<
+                    " with EventId: " << eventId);
 
       //set the  NewEventId of this entry
       faceEntry.setExpirationEvent(eventId);
@@ -307,6 +308,19 @@
 }
 
 void
+RibManager::expireEntry(const shared_ptr<const Interest>& request, ControlParameters& params)
+{
+  FaceEntry face;
+  face.faceId = params.getFaceId();
+  face.origin = params.getOrigin();
+  face.cost = params.getCost();
+  face.flags = params.getFlags();
+
+  NFD_LOG_DEBUG(face << " for " << params.getName() << " has expired");
+  unregisterEntry(request, params);
+}
+
+void
 RibManager::unregisterEntry(const shared_ptr<const Interest>& request,
                             ControlParameters& params)
 {
diff --git a/rib/rib-manager.hpp b/rib/rib-manager.hpp
index d08ab50..dffb24a 100644
--- a/rib/rib-manager.hpp
+++ b/rib/rib-manager.hpp
@@ -114,6 +114,9 @@
                   ControlParameters& parameters);
 
   void
+  expireEntry(const shared_ptr<const Interest>& request, ControlParameters& params);
+
+  void
   onCommandValidated(const shared_ptr<const Interest>& request);
 
   void
@@ -169,6 +172,7 @@
 
   void
   onControlHeaderError(uint32_t code, const std::string& reason);
+
   static bool
   extractParameters(const Name::Component& parameterComponent,
                     ControlParameters& extractedParameters);
@@ -216,8 +220,10 @@
   void
   onFetchFaceStatusTimeout();
 
-private:
+PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   Rib m_managedRib;
+
+private:
   ndn::Face& m_face;
   ndn::nfd::Controller m_nfdController;
   ndn::KeyChain m_keyChain;
diff --git a/rib/rib.cpp b/rib/rib.cpp
index 9901b77..c76940b 100644
--- a/rib/rib.cpp
+++ b/rib/rib.cpp
@@ -25,6 +25,10 @@
 
 #include "rib.hpp"
 
+#include "core/logger.hpp"
+
+NFD_LOG_INIT("Rib");
+
 namespace nfd {
 namespace rib {
 
@@ -127,7 +131,11 @@
         {
           // First cancel old scheduled event, if any, then set the EventId to new one
           if (static_cast<bool>(faceIt->getExpirationEvent()))
+            {
+              NFD_LOG_TRACE("Cancelling expiration event for " << entry->getName() << " "
+                                                               << *faceIt);
               scheduler::cancel(faceIt->getExpirationEvent());
+            }
 
           // No checks are required here as the iterator needs to be updated in all cases.
           faceIt->setExpirationEvent(face.getExpirationEvent());
@@ -211,6 +219,7 @@
           faceToErase.cost = faceIt->cost;
 
           entry->eraseFace(faceIt);
+
           m_nItems--;
 
           const bool captureWasTurnedOff = (hadCapture && !entry->hasCapture());
