diff --git a/tools/chunks/catchunks/consumer.cpp b/tools/chunks/catchunks/consumer.cpp
index 306cc16..431f058 100644
--- a/tools/chunks/catchunks/consumer.cpp
+++ b/tools/chunks/catchunks/consumer.cpp
@@ -30,7 +30,7 @@
 namespace ndn {
 namespace chunks {
 
-Consumer::Consumer(Validator& validator, bool isVerbose, std::ostream& os)
+Consumer::Consumer(security::v2::Validator& validator, bool isVerbose, std::ostream& os)
   : m_validator(validator)
   , m_outputStream(os)
   , m_nextToPrint(0)
@@ -47,49 +47,44 @@
   m_bufferedData.clear();
 
   m_discover->onDiscoverySuccess.connect(bind(&Consumer::startPipeline, this, _1));
-  m_discover->onDiscoveryFailure.connect(bind(&Consumer::onFailure, this, _1));
+  m_discover->onDiscoveryFailure.connect([] (const std::string& msg) {
+    BOOST_THROW_EXCEPTION(std::runtime_error(msg));
+  });
   m_discover->run();
 }
 
 void
 Consumer::startPipeline(const Data& data)
 {
-  m_validator.validate(data,
-                       bind(&Consumer::onDataValidated, this, _1),
-                       bind(&Consumer::onFailure, this, _2));
+  this->handleData(data);
 
   m_pipeline->run(data,
-                  bind(&Consumer::onData, this, _1, _2),
-                  bind(&Consumer::onFailure, this, _1));
+    [this] (const Interest&, const Data& data) { this->handleData(data); },
+    [] (const std::string& msg) { BOOST_THROW_EXCEPTION(std::runtime_error(msg)); });
 }
 
 void
-Consumer::onData(const Interest& interest, const Data& data)
+Consumer::handleData(const Data& data)
 {
+  auto dataPtr = data.shared_from_this();
+
   m_validator.validate(data,
-                       bind(&Consumer::onDataValidated, this, _1),
-                       bind(&Consumer::onFailure, this, _2));
-}
+    [this, dataPtr] (const Data& data) {
+      if (data.getContentType() == ndn::tlv::ContentType_Nack) {
+        if (m_isVerbose) {
+          std::cerr << "Application level NACK: " << data << std::endl;
+        }
+        m_pipeline->cancel();
+        BOOST_THROW_EXCEPTION(ApplicationNackError(data));
+      }
 
-void
-Consumer::onDataValidated(shared_ptr<const Data> data)
-{
-  if (data->getContentType() == ndn::tlv::ContentType_Nack) {
-    if (m_isVerbose)
-      std::cerr << "Application level NACK: " << *data << std::endl;
-
-    m_pipeline->cancel();
-    throw ApplicationNackError(*data);
-  }
-
-  m_bufferedData[getSegmentFromPacket(*data)] = data;
-  writeInOrderData();
-}
-
-void
-Consumer::onFailure(const std::string& reason)
-{
-  throw std::runtime_error(reason);
+      // 'data' passed to callback comes from DataValidationState and was not created with make_shared
+      m_bufferedData[getSegmentFromPacket(data)] = dataPtr;
+      writeInOrderData();
+    },
+    [this] (const Data& data, const security::v2::ValidationError& error) {
+      BOOST_THROW_EXCEPTION(DataValidationError(error));
+    });
 }
 
 void
diff --git a/tools/chunks/catchunks/consumer.hpp b/tools/chunks/catchunks/consumer.hpp
index 9996c14..3dcefe6 100644
--- a/tools/chunks/catchunks/consumer.hpp
+++ b/tools/chunks/catchunks/consumer.hpp
@@ -1,8 +1,8 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2016,  Regents of the University of California,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University.
+ * Copyright (c) 2016-2017, Regents of the University of California,
+ *                          Colorado State University,
+ *                          University Pierre & Marie Curie, Sorbonne University.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -31,7 +31,8 @@
 #include "discover-version.hpp"
 #include "pipeline-interests.hpp"
 
-#include <ndn-cxx/security/validator.hpp>
+#include <ndn-cxx/security/v2/validation-error.hpp>
+#include <ndn-cxx/security/v2/validator.hpp>
 
 namespace ndn {
 namespace chunks {
@@ -56,10 +57,20 @@
     }
   };
 
+  class DataValidationError : public std::runtime_error
+  {
+  public:
+    explicit
+    DataValidationError(const security::v2::ValidationError& error)
+      : std::runtime_error(boost::lexical_cast<std::string>(error))
+    {
+    }
+  };
+
   /**
    * @brief Create the consumer
    */
-  Consumer(Validator& validator, bool isVerbose, std::ostream& os = std::cout);
+  Consumer(security::v2::Validator& validator, bool isVerbose, std::ostream& os = std::cout);
 
   /**
    * @brief Run the consumer
@@ -72,20 +83,14 @@
   startPipeline(const Data& data);
 
   void
-  onData(const Interest& interest, const Data& data);
-
-  void
-  onDataValidated(shared_ptr<const Data> data);
-
-  void
-  onFailure(const std::string& reason);
+  handleData(const Data& data);
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   void
   writeInOrderData();
 
 private:
-  Validator& m_validator;
+  security::v2::Validator& m_validator;
   std::ostream& m_outputStream;
   unique_ptr<DiscoverVersion> m_discover;
   unique_ptr<PipelineInterests> m_pipeline;
diff --git a/tools/chunks/catchunks/ndncatchunks.cpp b/tools/chunks/catchunks/ndncatchunks.cpp
index 38cb23b..9d9b8a8 100644
--- a/tools/chunks/catchunks/ndncatchunks.cpp
+++ b/tools/chunks/catchunks/ndncatchunks.cpp
@@ -27,18 +27,18 @@
  * @author Weiwei Liu
  */
 
-#include "core/version.hpp"
-#include "options.hpp"
+#include "aimd-statistics-collector.hpp"
+#include "aimd-rtt-estimator.hpp"
 #include "consumer.hpp"
 #include "discover-version-fixed.hpp"
 #include "discover-version-iterative.hpp"
-#include "pipeline-interests-fixed-window.hpp"
 #include "pipeline-interests-aimd.hpp"
-#include "aimd-rtt-estimator.hpp"
-#include "aimd-statistics-collector.hpp"
+#include "pipeline-interests-fixed-window.hpp"
+#include "options.hpp"
+#include "core/version.hpp"
 
-#include <ndn-cxx/security/validator-null.hpp>
 #include <fstream>
+#include <ndn-cxx/security/validator-null.hpp>
 
 namespace ndn {
 namespace chunks {
@@ -267,8 +267,7 @@
       return 2;
     }
 
-    ValidatorNull validator;
-    Consumer consumer(validator, options.isVerbose);
+    Consumer consumer(security::v2::getAcceptAllValidator(), options.isVerbose);
 
     BOOST_ASSERT(discover != nullptr);
     BOOST_ASSERT(pipeline != nullptr);
