diff --git a/tests/chunks/consumer.t.cpp b/tests/chunks/consumer.t.cpp
index 14c7036..3662f24 100644
--- a/tests/chunks/consumer.t.cpp
+++ b/tests/chunks/consumer.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -66,7 +66,7 @@
 
   util::DummyClientFace face;
   output_test_stream output("");
-  Consumer cons(security::v2::getAcceptAllValidator(), false, output);
+  Consumer cons(security::v2::getAcceptAllValidator(), output);
 
   auto interest = makeInterest(name);
 
@@ -105,7 +105,7 @@
 
   util::DummyClientFace face;
   output_test_stream output("");
-  Consumer cons(security::v2::getAcceptAllValidator(), false, output);
+  Consumer cons(security::v2::getAcceptAllValidator(), output);
 
   auto interest = makeInterest(name);
   std::vector<shared_ptr<Data>> dataStore;
@@ -197,7 +197,7 @@
 {
   boost::asio::io_service io;
   util::DummyClientFace face(io);
-  Consumer consumer(security::v2::getAcceptAllValidator(), false);
+  Consumer consumer(security::v2::getAcceptAllValidator());
 
   Name prefix("/ndn/chunks/test");
   auto discover = make_unique<DiscoverVersionDummy>(prefix, face, Options());
diff --git a/tests/chunks/pipeline-interests-aimd.t.cpp b/tests/chunks/pipeline-interests-aimd.t.cpp
index d235bb1..98ba9ea 100644
--- a/tests/chunks/pipeline-interests-aimd.t.cpp
+++ b/tests/chunks/pipeline-interests-aimd.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -36,12 +36,11 @@
 
 using namespace ndn::tests;
 
-class PipelineInterestAimdFixture : public ndn::chunks::tests::PipelineInterestsFixture
+class PipelineInterestAimdFixture : public chunks::tests::PipelineInterestsFixture
 {
 public:
   PipelineInterestAimdFixture()
-    : PipelineInterestsFixture()
-    , opt(makePipelineOptions())
+    : opt(makePipelineOptions())
     , rttEstimator(makeRttEstimatorOptions())
   {
     createPipeline();
@@ -56,10 +55,12 @@
   }
 
 private:
-  static PipelineInterestsAimdOptions
+  static PipelineInterestsAimd::Options
   makePipelineOptions()
   {
-    PipelineInterestsAimdOptions pipelineOptions;
+    PipelineInterestsAimd::Options pipelineOptions;
+    pipelineOptions.isQuiet = true;
+    pipelineOptions.isVerbose = false;
     pipelineOptions.disableCwa = false;
     pipelineOptions.ignoreCongMarks = false;
     pipelineOptions.resetCwndToInit = false;
@@ -83,7 +84,7 @@
   }
 
 protected:
-  PipelineInterestsAimdOptions opt;
+  PipelineInterestsAimd::Options opt;
   RttEstimator rttEstimator;
   PipelineInterestsAimd* aimdPipeline;
   static constexpr double MARGIN = 0.01;
diff --git a/tests/chunks/pipeline-interests-fixed-window.t.cpp b/tests/chunks/pipeline-interests-fixed-window.t.cpp
index ef3cfc5..c4d4aad 100644
--- a/tests/chunks/pipeline-interests-fixed-window.t.cpp
+++ b/tests/chunks/pipeline-interests-fixed-window.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -35,30 +35,27 @@
 class PipelineInterestFixedWindowFixture : public PipelineInterestsFixture
 {
 public:
-  typedef PipelineInterestsFixedWindowOptions Options;
-
-public:
   PipelineInterestFixedWindowFixture()
-    : PipelineInterestsFixture()
-    , opt(makeOptions())
+    : opt(makeOptions())
   {
     setPipeline(make_unique<PipelineInterestsFixedWindow>(face, PipelineInterestsFixedWindow::Options(opt)));
   }
 
-protected:
-  Options opt;
-
 private:
-  static Options
+  static PipelineInterestsFixedWindow::Options
   makeOptions()
   {
-    Options options;
+    PipelineInterestsFixedWindow::Options options;
+    options.isQuiet = true;
     options.isVerbose = false;
     options.interestLifetime = time::seconds(1);
     options.maxRetriesOnTimeoutOrNack = 3;
     options.maxPipelineSize = 5;
     return options;
   }
+
+protected:
+  PipelineInterestsFixedWindow::Options opt;
 };
 
 BOOST_AUTO_TEST_SUITE(Chunks)
diff --git a/tools/chunks/catchunks/consumer.cpp b/tools/chunks/catchunks/consumer.cpp
index ce01583..974e8e0 100644
--- a/tools/chunks/catchunks/consumer.cpp
+++ b/tools/chunks/catchunks/consumer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -30,11 +30,10 @@
 namespace ndn {
 namespace chunks {
 
-Consumer::Consumer(security::v2::Validator& validator, bool isVerbose, std::ostream& os)
+Consumer::Consumer(security::v2::Validator& validator, std::ostream& os)
   : m_validator(validator)
   , m_outputStream(os)
   , m_nextToPrint(0)
-  , m_isVerbose(isVerbose)
 {
 }
 
@@ -65,10 +64,6 @@
   m_validator.validate(data,
     [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));
       }
 
diff --git a/tools/chunks/catchunks/consumer.hpp b/tools/chunks/catchunks/consumer.hpp
index 633d05b..10008c9 100644
--- a/tools/chunks/catchunks/consumer.hpp
+++ b/tools/chunks/catchunks/consumer.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -70,7 +70,8 @@
   /**
    * @brief Create the consumer
    */
-  Consumer(security::v2::Validator& validator, bool isVerbose, std::ostream& os = std::cout);
+  explicit
+  Consumer(security::v2::Validator& validator, std::ostream& os = std::cout);
 
   /**
    * @brief Run the consumer
@@ -92,7 +93,6 @@
   unique_ptr<DiscoverVersion> m_discover;
   unique_ptr<PipelineInterests> m_pipeline;
   uint64_t m_nextToPrint;
-  bool m_isVerbose;
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   std::map<uint64_t, shared_ptr<const Data>> m_bufferedData;
diff --git a/tools/chunks/catchunks/ndncatchunks.cpp b/tools/chunks/catchunks/ndncatchunks.cpp
index 768dd7a..497197f 100644
--- a/tools/chunks/catchunks/ndncatchunks.cpp
+++ b/tools/chunks/catchunks/ndncatchunks.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -78,7 +78,8 @@
                     "lifetime of expressed Interests, in milliseconds")
     ("retries,r",   po::value<int>(&options.maxRetriesOnTimeoutOrNack)->default_value(options.maxRetriesOnTimeoutOrNack),
                     "maximum number of retries in case of Nack or timeout (-1 = no limit)")
-    ("verbose,v",   po::bool_switch(&options.isVerbose), "turn on verbose output")
+    ("quiet,q",     po::bool_switch(&options.isQuiet), "suppress all diagnostic output, except fatal errors")
+    ("verbose,v",   po::bool_switch(&options.isVerbose), "turn on verbose output (per segment information")
     ("version,V",   "print program version and exit")
     ;
 
@@ -208,9 +209,13 @@
     std::cerr << "ERROR: lifetime cannot be negative" << std::endl;
     return 2;
   }
-
   options.interestLifetime = time::milliseconds(vm["lifetime"].as<int64_t>());
 
+  if (options.isQuiet && options.isVerbose) {
+    std::cerr << "ERROR: cannot be quiet and verbose at the same time" << std::endl;
+    return 2;
+  }
+
   try {
     Face face;
 
@@ -288,8 +293,7 @@
       return 2;
     }
 
-    Consumer consumer(security::v2::getAcceptAllValidator(), options.isVerbose);
-
+    Consumer consumer(security::v2::getAcceptAllValidator());
     BOOST_ASSERT(discover != nullptr);
     BOOST_ASSERT(pipeline != nullptr);
     consumer.run(std::move(discover), std::move(pipeline));
@@ -299,6 +303,10 @@
     std::cerr << "ERROR: " << e.what() << std::endl;
     return 3;
   }
+  catch (const Consumer::DataValidationError& e) {
+    std::cerr << "ERROR: " << e.what() << std::endl;
+    return 5;
+  }
   catch (const std::exception& e) {
     std::cerr << "ERROR: " << e.what() << std::endl;
     return 1;
diff --git a/tools/chunks/catchunks/options.hpp b/tools/chunks/catchunks/options.hpp
index 4034744..b078277 100644
--- a/tools/chunks/catchunks/options.hpp
+++ b/tools/chunks/catchunks/options.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -38,6 +38,7 @@
   time::milliseconds interestLifetime = ndn::DEFAULT_INTEREST_LIFETIME;
   int maxRetriesOnTimeoutOrNack = 3;
   bool mustBeFresh = false;
+  bool isQuiet = false;
   bool isVerbose = false;
 };
 
diff --git a/tools/chunks/catchunks/pipeline-interests-aimd.cpp b/tools/chunks/catchunks/pipeline-interests-aimd.cpp
index fceb90b..bf530ff 100644
--- a/tools/chunks/catchunks/pipeline-interests-aimd.cpp
+++ b/tools/chunks/catchunks/pipeline-interests-aimd.cpp
@@ -292,7 +292,7 @@
   if (m_hasFinalBlockId &&
       static_cast<uint64_t>(m_nReceived - 1) >= m_lastSegmentNo) { // all segments have been received
     cancel();
-    if (m_options.isVerbose) {
+    if (!m_options.isQuiet) {
       printSummary();
     }
   }
diff --git a/tools/chunks/catchunks/pipeline-interests-fixed-window.cpp b/tools/chunks/catchunks/pipeline-interests-fixed-window.cpp
index 40a4417..69f9dc9 100644
--- a/tools/chunks/catchunks/pipeline-interests-fixed-window.cpp
+++ b/tools/chunks/catchunks/pipeline-interests-fixed-window.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017, Regents of the University of California,
+ * Copyright (c) 2016-2018, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -143,7 +143,7 @@
   BOOST_ASSERT(m_nReceived > 0);
   if (m_hasFinalBlockId &&
       static_cast<uint64_t>(m_nReceived - 1) >= m_lastSegmentNo) { // all segments have been received
-    if (m_options.isVerbose) {
+    if (!m_options.isQuiet) {
       printSummary();
     }
   }
