diff --git a/src/handles/base-handle.hpp b/src/handles/base-handle.hpp
index 95b8caa..a598883 100644
--- a/src/handles/base-handle.hpp
+++ b/src/handles/base-handle.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -31,7 +31,7 @@
 class BaseHandle : noncopyable
 {
 public:
-  class Error : std::runtime_error
+  class Error : public std::runtime_error
   {
   public:
     explicit
diff --git a/src/handles/delete-handle.cpp b/src/handles/delete-handle.cpp
index 5cd0506..5cfbea2 100644
--- a/src/handles/delete-handle.cpp
+++ b/src/handles/delete-handle.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -40,7 +40,7 @@
 void
 DeleteHandle::onRegisterFailed(const Name& prefix, const std::string& reason)
 {
-  throw Error("Delete prefix registration failed");
+  BOOST_THROW_EXCEPTION(Error("Delete prefix registration failed"));
 }
 
 
@@ -54,7 +54,7 @@
 void
 DeleteHandle::onCheckRegisterFailed(const Name& prefix, const std::string& reason)
 {
-  throw Error("Delete check prefix registration failed");
+  BOOST_THROW_EXCEPTION(Error("Delete check prefix registration failed"));
 }
 
 
@@ -194,4 +194,4 @@
   }
 }
 
-} //namespace repo
+} // namespace repo
diff --git a/src/handles/tcp-bulk-insert-handle.cpp b/src/handles/tcp-bulk-insert-handle.cpp
index a445110..1d81b17 100644
--- a/src/handles/tcp-bulk-insert-handle.cpp
+++ b/src/handles/tcp-bulk-insert-handle.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -84,7 +84,7 @@
   ip::tcp::resolver::iterator end;
 
   if (endpoint == end)
-    throw Error("Cannot listen on [" + host + ":" + port + "]");
+    BOOST_THROW_EXCEPTION(Error("Cannot listen on [" + host + ":" + port + "]"));
 
   m_localEndpoint = *endpoint;
   std::cerr << "Start listening on " << m_localEndpoint  << std::endl;
@@ -179,7 +179,7 @@
         else
           std::cerr << "FAILED to inject " << data.getName() << std::endl;
       }
-      catch (std::runtime_error& error) {
+      catch (const std::runtime_error& error) {
         /// \todo Catch specific error after determining what wireDecode() can throw
         std::cerr << "Error decoding received Data packet" << std::endl;
       }
diff --git a/src/handles/watch-handle.cpp b/src/handles/watch-handle.cpp
index 9e80212..25ce278 100644
--- a/src/handles/watch-handle.cpp
+++ b/src/handles/watch-handle.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -68,7 +68,7 @@
 WatchHandle::onRegisterFailed(const Name& prefix, const std::string& reason)
 {
   std::cerr << reason << std::endl;
-  throw Error("watch prefix registration failed");
+  BOOST_THROW_EXCEPTION(Error("watch prefix registration failed"));
 }
 
 void
@@ -106,7 +106,7 @@
 }
 
 void
-WatchHandle::onData(const Interest& interest, ndn::Data& data, const Name& name)
+WatchHandle::onData(const Interest& interest, const ndn::Data& data, const Name& name)
 {
   m_validator.validate(data,
                        bind(&WatchHandle::onDataValidated, this, interest, _1, name),
@@ -148,10 +148,11 @@
     ++m_interestNum;
     getFace().expressInterest(fetchInterest,
                               bind(&WatchHandle::onData, this, _1, _2, name),
+                              bind(&WatchHandle::onTimeout, this, _1, name), // Nack
                               bind(&WatchHandle::onTimeout, this, _1, name));
   }
   else {
-    throw Error("Insert into Repo Failed");
+    BOOST_THROW_EXCEPTION(Error("Insert into Repo Failed"));
   }
   m_processes[name].first.setInsertNum(m_size);
 }
@@ -190,6 +191,7 @@
   ++m_interestNum;
   getFace().expressInterest(fetchInterest,
                             bind(&WatchHandle::onData, this, _1, _2, name),
+                            bind(&WatchHandle::onTimeout, this, _1, name), // Nack
                             bind(&WatchHandle::onTimeout, this, _1, name));
 }
 
@@ -211,6 +213,7 @@
   ++m_interestNum;
   getFace().expressInterest(fetchInterest,
                             bind(&WatchHandle::onData, this, _1, _2, name),
+                            bind(&WatchHandle::onTimeout, this, _1, name), // Nack
                             bind(&WatchHandle::onTimeout, this, _1, name));
 
 }
@@ -310,7 +313,7 @@
 WatchHandle::deferredDeleteProcess(const Name& name)
 {
   getScheduler().scheduleEvent(PROCESS_DELETE_TIME,
-                               ndn::bind(&WatchHandle::deleteProcess, this, name));
+                               bind(&WatchHandle::deleteProcess, this, name));
 }
 
 void
@@ -351,6 +354,7 @@
   m_interestNum++;
   getFace().expressInterest(fetchInterest,
                             bind(&WatchHandle::onData, this, _1, _2, parameter.getName()),
+                            bind(&WatchHandle::onTimeout, this, _1, parameter.getName()), // Nack
                             bind(&WatchHandle::onTimeout, this, _1, parameter.getName()));
 }
 
@@ -377,4 +381,4 @@
   return true;
 }
 
-} //namespace repo
+} // namespace repo
diff --git a/src/handles/watch-handle.hpp b/src/handles/watch-handle.hpp
index 2fde3cf..f34b1fb 100644
--- a/src/handles/watch-handle.hpp
+++ b/src/handles/watch-handle.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -87,7 +87,7 @@
    * @brief fetch data and send next interest
    */
   void
-  onData(const Interest& interest, Data& data, const Name& name);
+  onData(const Interest& interest, const Data& data, const Name& name);
 
   /**
    * @brief handle when fetching one data timeout
@@ -169,4 +169,4 @@
 
 } // namespace repo
 
-#endif // REPO_HANDLES_Watch_HANDLE_HPP
+#endif // REPO_HANDLES_WATCH_HANDLE_HPP
diff --git a/src/handles/write-handle.cpp b/src/handles/write-handle.cpp
index 08e951b..16c622e 100644
--- a/src/handles/write-handle.cpp
+++ b/src/handles/write-handle.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -59,7 +59,7 @@
 WriteHandle::onRegisterFailed(const Name& prefix, const std::string& reason)
 {
   std::cerr << reason << std::endl;
-  throw Error("Insert prefix registration failed");
+  BOOST_THROW_EXCEPTION(Error("Insert prefix registration failed"));
 }
 
 // onRegisterFailed for insert.
@@ -67,7 +67,7 @@
 WriteHandle::onCheckRegisterFailed(const Name& prefix, const std::string& reason)
 {
   std::cerr << reason << std::endl;
-  throw Error("Insert check prefix registration failed");
+  BOOST_THROW_EXCEPTION(Error("Insert check prefix registration failed"));
 }
 
 void
@@ -106,7 +106,7 @@
 }
 
 void
-WriteHandle::onData(const Interest& interest, Data& data, ProcessId processId)
+WriteHandle::onData(const Interest& interest, const Data& data, ProcessId processId)
 {
   m_validator.validate(data,
                        bind(&WriteHandle::onDataValidated, this, interest, _1, processId),
@@ -143,7 +143,7 @@
 }
 
 void
-WriteHandle::onSegmentData(const Interest& interest, Data& data, ProcessId processId)
+WriteHandle::onSegmentData(const Interest& interest, const Data& data, ProcessId processId)
 {
   m_validator.validate(data,
                        bind(&WriteHandle::onSegmentDataValidated, this, interest, _1, processId),
@@ -247,6 +247,7 @@
     interest.setInterestLifetime(m_interestLifetime);
     getFace().expressInterest(interest,
                               bind(&WriteHandle::onSegmentData, this, _1, _2, processId),
+                              bind(&WriteHandle::onSegmentTimeout, this, _1, processId), // Nack
                               bind(&WriteHandle::onSegmentTimeout, this, _1, processId));
     process.credit--;
     processRetry[segment] = 0;
@@ -341,6 +342,7 @@
   fetchInterest.setInterestLifetime(m_interestLifetime);
   getFace().expressInterest(fetchInterest,
                             bind(&WriteHandle::onSegmentData, this, _1, _2, processId),
+                            bind(&WriteHandle::onSegmentTimeout, this, _1, processId), // Nack
                             bind(&WriteHandle::onSegmentTimeout, this, _1, processId));
   //When an interest is expressed, processCredit--
   processCredit--;
@@ -392,6 +394,7 @@
     retryInterest.setInterestLifetime(m_interestLifetime);
     getFace().expressInterest(retryInterest,
                               bind(&WriteHandle::onSegmentData, this, _1, _2, processId),
+                              bind(&WriteHandle::onSegmentTimeout, this, _1, processId), // Nack
                               bind(&WriteHandle::onSegmentTimeout, this, _1, processId));
   }
 
@@ -464,7 +467,7 @@
 WriteHandle::deferredDeleteProcess(ProcessId processId)
 {
   getScheduler().scheduleEvent(PROCESS_DELETE_TIME,
-                               ndn::bind(&WriteHandle::deleteProcess, this, processId));
+                               bind(&WriteHandle::deleteProcess, this, processId));
 }
 
 void
@@ -491,6 +494,7 @@
   }
   getFace().expressInterest(fetchInterest,
                             bind(&WriteHandle::onData, this, _1, _2, processId),
+                            bind(&WriteHandle::onTimeout, this, _1, processId), // Nack
                             bind(&WriteHandle::onTimeout, this, _1, processId));
 }
 
@@ -569,4 +573,4 @@
   reply(interest, response);
 }
 
-} //namespace repo
+} // namespace repo
diff --git a/src/handles/write-handle.hpp b/src/handles/write-handle.hpp
index 1c64437..a02f675 100644
--- a/src/handles/write-handle.hpp
+++ b/src/handles/write-handle.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -125,7 +125,7 @@
    * @brief fetch one data
    */
   void
-  onData(const Interest& interest, Data& data, ProcessId processId);
+  onData(const Interest& interest, const Data& data, ProcessId processId);
 
   void
   onDataValidated(const Interest& interest, const std::shared_ptr<const Data>& data,
@@ -145,7 +145,7 @@
    * @brief fetch segmented data
    */
   void
-  onSegmentData(const Interest& interest, Data& data, ProcessId processId);
+  onSegmentData(const Interest& interest, const Data& data, ProcessId processId);
 
   void
   onSegmentDataValidated(const Interest& interest, const std::shared_ptr<const Data>& data,
diff --git a/src/repo-command-parameter.hpp b/src/repo-command-parameter.hpp
index 22a8bcd..3648679 100644
--- a/src/repo-command-parameter.hpp
+++ b/src/repo-command-parameter.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -38,7 +38,7 @@
 
 /**
 * @brief Class defining abstraction of parameter of command for NDN Repo Protocol
-* @sa link http://redmine.named-data.net/projects/repo-ng/wiki/Repo_Protocol_Specification#RepoCommandParameter
+* @sa link https://redmine.named-data.net/projects/repo-ng/wiki/Repo_Protocol_Specification#RepoCommandParameter
 **/
 
 class RepoCommandParameter
@@ -370,7 +370,7 @@
   m_wire.parse();
 
   if (m_wire.type() != tlv::RepoCommandParameter)
-    throw Error("Requested decoding of RepoCommandParameter, but Block is of different type");
+    BOOST_THROW_EXCEPTION(Error("Requested decoding of RepoCommandParameter, but Block is of different type"));
 
   // Name
   Block::element_const_iterator val = m_wire.find(tlv::Name);
diff --git a/src/repo-command-response.hpp b/src/repo-command-response.hpp
index 79dc027..d8f1fe8 100644
--- a/src/repo-command-response.hpp
+++ b/src/repo-command-response.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -35,7 +35,7 @@
 
 /**
 * @brief Class defining abstraction of Response for NDN Repo Protocol
-* @sa link http://redmine.named-data.net/projects/repo-ng/wiki/Repo_Protocol_Specification#Repo-Command-Response
+* @sa link https://redmine.named-data.net/projects/repo-ng/wiki/Repo_Protocol_Specification#Repo-Command-Response
 */
 class RepoCommandResponse
 {
@@ -262,8 +262,9 @@
     totalLength += variableLength;
     totalLength += encoder.prependVarNumber(variableLength);
     totalLength += encoder.prependVarNumber(tlv::StatusCode);
-  } else {
-    throw Error("required field StatusCode is missing");
+  }
+  else {
+    BOOST_THROW_EXCEPTION(Error("required field StatusCode is missing"));
   }
 
   if (m_hasProcessId) {
@@ -311,7 +312,7 @@
   Block::element_const_iterator val;
 
   if (m_wire.type() != tlv::RepoCommandResponse)
-    throw Error("RepoCommandResponse malformed");
+    BOOST_THROW_EXCEPTION(Error("RepoCommandResponse malformed"));
 
   // StartBlockId
   val = m_wire.find(tlv::StartBlockId);
@@ -344,8 +345,9 @@
     m_hasStatusCode = true;
     m_statusCode = readNonNegativeInteger(*val);
 
-  } else {
-    throw Error("required field StatusCode is missing");
+  }
+  else {
+    BOOST_THROW_EXCEPTION(Error("required field StatusCode is missing"));
   }
 
   // InsertNum
diff --git a/src/repo.cpp b/src/repo.cpp
index 0ec3837..dcf7007 100644
--- a/src/repo.cpp
+++ b/src/repo.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -31,15 +31,15 @@
 
   std::ifstream fin(configPath.c_str());
   if (!fin.is_open())
-    throw Repo::Error("failed to open configuration file '"+ configPath +"'");
+    BOOST_THROW_EXCEPTION(Repo::Error("failed to open configuration file '"+ configPath +"'"));
 
   using namespace boost::property_tree;
   ptree propertyTree;
   try {
     read_info(fin, propertyTree);
   }
-  catch (ptree_error& e) {
-    throw Repo::Error("failed to read configuration file '"+ configPath +"'");
+  catch (const ptree_error& e) {
+    BOOST_THROW_EXCEPTION(Repo::Error("failed to read configuration file '"+ configPath +"'"));
   }
 
   ptree repoConf = propertyTree.get_child("repo");
@@ -55,8 +55,8 @@
     if (it->first == "prefix")
       repoConfig.dataPrefixes.push_back(Name(it->second.get_value<std::string>()));
     else
-      throw Repo::Error("Unrecognized '" + it->first + "' option in 'data' section in "
-                        "configuration file '"+ configPath +"'");
+      BOOST_THROW_EXCEPTION(Repo::Error("Unrecognized '" + it->first + "' option in 'data' section in "
+                                        "configuration file '"+ configPath +"'"));
   }
 
   ptree commandConf = repoConf.get_child("command");
@@ -67,8 +67,8 @@
     if (it->first == "prefix")
       repoConfig.repoPrefixes.push_back(Name(it->second.get_value<std::string>()));
     else
-      throw Repo::Error("Unrecognized '" + it->first + "' option in 'command' section in "
-                        "configuration file '"+ configPath +"'");
+      BOOST_THROW_EXCEPTION(Repo::Error("Unrecognized '" + it->first + "' option in 'command' section in "
+                                        "configuration file '"+ configPath +"'"));
   }
 
   ptree tcpBulkInsert = repoConf.get_child("tcp_bulk_insert");
@@ -92,15 +92,16 @@
       port = it->second.get_value<std::string>();
     }
     else
-      throw Repo::Error("Unrecognized '" + it->first + "' option in 'tcp_bulk_insert' section in "
-                        "configuration file '"+ configPath +"'");
+      BOOST_THROW_EXCEPTION(Repo::Error("Unrecognized '" + it->first + "' option in 'tcp_bulk_insert' section in "
+                                        "configuration file '"+ configPath +"'"));
   }
   if (isTcpBulkEnabled) {
     repoConfig.tcpBulkInsertEndpoints.push_back(std::make_pair(host, port));
   }
 
-  if (repoConf.get<std::string>("storage.method") != "sqlite")
-    throw Repo::Error("Only 'sqlite' storage method is supported");
+  if (repoConf.get<std::string>("storage.method") != "sqlite") {
+    BOOST_THROW_EXCEPTION(Repo::Error("Only 'sqlite' storage method is supported"));
+  }
 
   repoConfig.dbPath = repoConf.get<std::string>("storage.path");
 
diff --git a/src/storage/index.cpp b/src/storage/index.cpp
index 572dc97..3197a70 100644
--- a/src/storage/index.cpp
+++ b/src/storage/index.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -67,7 +67,7 @@
 Index::insert(const Data& data, int64_t id)
 {
   if (isFull())
-    throw Error("The Index is Full. Cannot Insert Any Data!");
+    BOOST_THROW_EXCEPTION(Error("The Index is Full. Cannot Insert Any Data!"));
   Entry entry(data, id);
   bool isInserted = m_indexContainer.insert(entry).second;
   if (isInserted)
@@ -80,7 +80,7 @@
               const ndn::ConstBufferPtr& keyLocatorHash)
 {
   if (isFull())
-    throw Error("The Index is Full. Cannot Insert Any Data!");
+    BOOST_THROW_EXCEPTION(Error("The Index is Full. Cannot Insert Any Data!"));
   Entry entry(fullName, keyLocatorHash, id);
   bool isInserted = m_indexContainer.insert(entry).second;
   if (isInserted)
@@ -160,7 +160,7 @@
 Index::computeKeyLocatorHash(const KeyLocator& keyLocator)
 {
   const Block& block = keyLocator.wireEncode();
-  ndn::ConstBufferPtr keyLocatorHash = ndn::crypto::sha256(block.wire(), block.size());
+  ndn::ConstBufferPtr keyLocatorHash = ndn::crypto::computeSha256Digest(block.wire(), block.size());
   return keyLocatorHash;
 }
 
@@ -175,7 +175,7 @@
     {
       KeyLocator keyLocator = interest.getPublisherPublicKeyLocator();
       const Block& block = keyLocator.wireEncode();
-      hash = ndn::crypto::sha256(block.wire(), block.size());
+      hash = ndn::crypto::computeSha256Digest(block.wire(), block.size());
     }
 
   if (isLeftmost)
diff --git a/src/storage/repo-storage.cpp b/src/storage/repo-storage.cpp
index 381ccaa..49873d7 100644
--- a/src/storage/repo-storage.cpp
+++ b/src/storage/repo-storage.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -46,7 +46,7 @@
 {
    bool isExist = m_index.hasData(data);
    if (isExist)
-     throw Error("The Entry Has Already In the Skiplist. Cannot be Inserted!");
+     BOOST_THROW_EXCEPTION(Error("The Entry Has Already In the Skiplist. Cannot be Inserted!"));
    int64_t id = m_storage.insert(data);
    if (id == -1)
      return false;
diff --git a/src/storage/sqlite-storage.cpp b/src/storage/sqlite-storage.cpp
index 7edcda7..ae380ea 100644
--- a/src/storage/sqlite-storage.cpp
+++ b/src/storage/sqlite-storage.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -40,7 +40,7 @@
     boost::filesystem::file_status fsPathStatus = boost::filesystem::status(fsPath);
     if (!boost::filesystem::is_directory(fsPathStatus)) {
       if (!boost::filesystem::create_directory(boost::filesystem::path(fsPath))) {
-        throw Error("Folder '" + dbPath + "' does not exists and cannot be created");
+        BOOST_THROW_EXCEPTION(Error("Folder '" + dbPath + "' does not exists and cannot be created"));
       }
     }
 
@@ -75,7 +75,7 @@
   }
   else {
     std::cerr << "Database file open failure rc:" << rc << std::endl;
-    throw Error("Database file open failure");
+    BOOST_THROW_EXCEPTION(Error("Database file open failure"));
   }
   sqlite3_exec(m_db, "PRAGMA synchronous = OFF", 0, 0, &errMsg);
   sqlite3_exec(m_db, "PRAGMA journal_mode = WAL", 0, 0, &errMsg);
@@ -87,15 +87,14 @@
 }
 
 void
-SqliteStorage::fullEnumerate(const ndn::function
-                             <void(const Storage::ItemMeta)>& f)
+SqliteStorage::fullEnumerate(const std::function<void(const Storage::ItemMeta)>& f)
 {
   sqlite3_stmt* m_stmt = 0;
   int rc = SQLITE_DONE;
   string sql = string("SELECT id, name, keylocatorHash FROM NDN_REPO;");
   rc = sqlite3_prepare_v2(m_db, sql.c_str(), -1, &m_stmt, 0);
   if (rc != SQLITE_OK)
-    throw Error("Initiation Read Entries from Database Prepare error");
+    BOOST_THROW_EXCEPTION(Error("Initiation Read Entries from Database Prepare error"));
   int entryNumber = 0;
   while (true) {
     rc = sqlite3_step(m_stmt);
@@ -124,7 +123,7 @@
     else {
       std::cerr << "Initiation Read Entries rc:" << rc << std::endl;
       sqlite3_finalize(m_stmt);
-      throw Error("Initiation Read Entries error");
+      BOOST_THROW_EXCEPTION(Error("Initiation Read Entries error"));
     }
   }
   m_size = entryNumber;
@@ -168,14 +167,14 @@
     if (rc == SQLITE_CONSTRAINT) {
       std::cerr << "Insert  failed" << std::endl;
       sqlite3_finalize(insertStmt);
-      throw Error("Insert failed");
+      BOOST_THROW_EXCEPTION(Error("Insert failed"));
      }
     sqlite3_reset(insertStmt);
      m_size++;
      id = sqlite3_last_insert_rowid(m_db);
   }
   else {
-    throw Error("Some error with insert");
+    BOOST_THROW_EXCEPTION(Error("Some error with insert"));
   }
 
   sqlite3_finalize(insertStmt);
@@ -193,7 +192,7 @@
   if (sqlite3_prepare_v2(m_db, deleteSql.c_str(), -1, &deleteStmt, 0) != SQLITE_OK) {
     sqlite3_finalize(deleteStmt);
     std::cerr << "delete statement prepared failed" << std::endl;
-    throw Error("delete statement prepared failed");
+    BOOST_THROW_EXCEPTION(Error("delete statement prepared failed"));
   }
 
   if (sqlite3_bind_int64(deleteStmt, 1, id) == SQLITE_OK) {
@@ -201,7 +200,7 @@
     if (rc != SQLITE_DONE && rc != SQLITE_ROW) {
       std::cerr << " node delete error rc:" << rc << std::endl;
       sqlite3_finalize(deleteStmt);
-      throw Error(" node delete error");
+      BOOST_THROW_EXCEPTION(Error(" node delete error"));
     }
     if (sqlite3_changes(m_db) != 1)
       return false;
@@ -210,7 +209,7 @@
   else {
     std::cerr << "delete bind error" << std::endl;
     sqlite3_finalize(deleteStmt);
-    throw Error("delete bind error");
+    BOOST_THROW_EXCEPTION(Error("delete bind error"));
   }
   sqlite3_finalize(deleteStmt);
   return true;
@@ -239,20 +238,20 @@
       else {
         std::cerr << "Database query failure rc:" << rc << std::endl;
         sqlite3_finalize(queryStmt);
-        throw Error("Database query failure");
+        BOOST_THROW_EXCEPTION(Error("Database query failure"));
       }
     }
     else {
       std::cerr << "select bind error" << std::endl;
       sqlite3_finalize(queryStmt);
-      throw Error("select bind error");
+      BOOST_THROW_EXCEPTION(Error("select bind error"));
     }
     sqlite3_finalize(queryStmt);
   }
   else {
     sqlite3_finalize(queryStmt);
     std::cerr << "select statement prepared failed" << std::endl;
-    throw Error("select statement prepared failed");
+    BOOST_THROW_EXCEPTION(Error("select statement prepared failed"));
   }
   return shared_ptr<Data>();
 }
@@ -267,7 +266,7 @@
     {
       std::cerr << "Database query failure rc:" << rc << std::endl;
       sqlite3_finalize(queryStmt);
-      throw Error("Database query failure");
+      BOOST_THROW_EXCEPTION(Error("Database query failure"));
     }
 
   rc = sqlite3_step(queryStmt);
@@ -275,7 +274,7 @@
     {
       std::cerr << "Database query failure rc:" << rc << std::endl;
       sqlite3_finalize(queryStmt);
-      throw Error("Database query failure");
+      BOOST_THROW_EXCEPTION(Error("Database query failure"));
     }
 
   int64_t nDatas = sqlite3_column_int64(queryStmt, 0);
@@ -285,4 +284,4 @@
   return nDatas;
 }
 
-} //namespace repo
+} // namespace repo
