diff --git a/tests/chunks/producer.t.cpp b/tests/chunks/producer.t.cpp
index c19920b..479d03f 100644
--- a/tests/chunks/producer.t.cpp
+++ b/tests/chunks/producer.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2016-2017,  Regents of the University of California,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University.
@@ -90,7 +90,7 @@
   for (size_t i = 0; i <  testStrings.size(); ++i) {
     std::istringstream str(testStrings[i]);
     Producer prod(prefix, face, m_keyChain, signingInfo, time::seconds(4), maxSegmentSize, false,
-                  false, str);
+                  false, false, str);
 
     size_t expectedSize = std::ceil(static_cast<double>(testStrings[i].size()) / maxSegmentSize);
     if (testStrings[i].size() == 0)
@@ -103,7 +103,7 @@
 BOOST_AUTO_TEST_CASE(RequestSegmentUnspecifiedVersion)
 {
   Producer producer(prefix, face, m_keyChain, signingInfo, freshnessPeriod, maxSegmentSize,
-                    false, false, testString);
+                    false, false, false, testString);
   io.poll();
 
   size_t nSegments = std::ceil(static_cast<double>(testString.str().size()) / maxSegmentSize);
@@ -140,7 +140,7 @@
 BOOST_AUTO_TEST_CASE(RequestSegmentSpecifiedVersion)
 {
   Producer producer(prefix.appendVersion(version), face, m_keyChain, signingInfo, freshnessPeriod,
-                    maxSegmentSize, false, false, testString);
+                    maxSegmentSize, false, false, false, testString);
   io.poll();
 
   size_t nSegments = std::ceil(static_cast<double>(testString.str().size()) / maxSegmentSize);
@@ -178,7 +178,7 @@
 BOOST_AUTO_TEST_CASE(RequestNotExistingSegment)
 {
   Producer producer(prefix, face, m_keyChain, signingInfo, freshnessPeriod, maxSegmentSize,
-                    false, false, testString);
+                    false, false, false, testString);
   io.poll();
 
   size_t nSegments = std::ceil(static_cast<double>(testString.str().size()) / maxSegmentSize);
diff --git a/tools/chunks/putchunks/ndnputchunks.cpp b/tools/chunks/putchunks/ndnputchunks.cpp
index 195d2ca..7dbb5a8 100644
--- a/tools/chunks/putchunks/ndnputchunks.cpp
+++ b/tools/chunks/putchunks/ndnputchunks.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2016,  Regents of the University of California,
+/*
+ * Copyright (c) 2016-2017,  Regents of the University of California,
  *                      Colorado State University,
  *                      University Pierre & Marie Curie, Sorbonne University.
  *
@@ -23,6 +23,7 @@
  * @author Wentao Shang
  * @author Steve DiBenedetto
  * @author Andrea Tosatto
+ * @author Klaus Schneider
  */
 
 #include "core/version.hpp"
@@ -50,6 +51,7 @@
   size_t maxChunkSize = MAX_NDN_PACKET_SIZE >> 1;
   std::string signingStr;
   bool isVerbose = false;
+  bool isQuiet = false;
   std::string prefix;
 
   po::options_description visibleDesc("Options");
@@ -62,7 +64,8 @@
                         "maximum chunk size, in bytes")
     ("signing-info,S",  po::value<std::string>(&signingStr)->default_value(signingStr),
                         "set signing information")
-    ("verbose,v",       po::bool_switch(&isVerbose), "turn on verbose output")
+    ("quiet,q",         po::bool_switch(&isQuiet), "turn off all non-error output")
+    ("verbose,v",       po::bool_switch(&isVerbose), "turn on verbose output (per Interest information)")
     ("version,V",       "print program version and exit")
     ;
 
@@ -110,6 +113,11 @@
     return 2;
   }
 
+  if (isQuiet && isVerbose) {
+    std::cerr << "ERROR: Cannot use flags -q and -v at the same time\n";
+    return 2;
+  }
+
   security::SigningInfo signingInfo;
   try {
     signingInfo = security::SigningInfo(signingStr);
@@ -123,7 +131,7 @@
     Face face;
     KeyChain keyChain;
     Producer producer(prefix, face, keyChain, signingInfo, time::milliseconds(freshnessPeriod),
-                      maxChunkSize, isVerbose, printVersion, std::cin);
+                      maxChunkSize, isQuiet, isVerbose, printVersion, std::cin);
     producer.run();
   }
   catch (const std::exception& e) {
diff --git a/tools/chunks/putchunks/producer.cpp b/tools/chunks/putchunks/producer.cpp
index 141be5b..5e50900 100644
--- a/tools/chunks/putchunks/producer.cpp
+++ b/tools/chunks/putchunks/producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2016,  Regents of the University of California,
+/*
+ * Copyright (c) 2016-2017,  Regents of the University of California,
  *                      Colorado State University,
  *                      University Pierre & Marie Curie, Sorbonne University.
  *
@@ -23,6 +23,7 @@
  * @author Wentao Shang
  * @author Steve DiBenedetto
  * @author Andrea Tosatto
+ * @author Klaus Schneider
  */
 
 #include "producer.hpp"
@@ -36,6 +37,7 @@
                    const security::SigningInfo& signingInfo,
                    time::milliseconds freshnessPeriod,
                    size_t maxSegmentSize,
+                   bool isQuiet,
                    bool isVerbose,
                    bool needToPrintVersion,
                    std::istream& is)
@@ -44,6 +46,7 @@
   , m_signingInfo(signingInfo)
   , m_freshnessPeriod(freshnessPeriod)
   , m_maxSegmentSize(maxSegmentSize)
+  , m_isQuiet(isQuiet)
   , m_isVerbose(isVerbose)
 {
   if (prefix.size() > 0 && prefix[-1].isVersion()) {
@@ -65,7 +68,7 @@
                            RegisterPrefixSuccessCallback(),
                            bind(&Producer::onRegisterFailed, this, _1, _2));
 
-  if (m_isVerbose)
+  if (!m_isQuiet)
     std::cerr << "Data published with name: " << m_versionedPrefix << std::endl;
 }
 
@@ -113,7 +116,7 @@
 {
   BOOST_ASSERT(m_store.size() == 0);
 
-  if (m_isVerbose)
+  if (!m_isQuiet)
     std::cerr << "Loading input ..." << std::endl;
 
   std::vector<uint8_t> buffer(m_maxSegmentSize);
@@ -141,7 +144,7 @@
     m_keyChain.sign(*data, m_signingInfo);
   }
 
-  if (m_isVerbose)
+  if (!m_isQuiet)
     std::cerr << "Created " << m_store.size() << " chunks for prefix " << m_prefix << std::endl;
 }
 
diff --git a/tools/chunks/putchunks/producer.hpp b/tools/chunks/putchunks/producer.hpp
index 061a2bf..86dcad7 100644
--- a/tools/chunks/putchunks/producer.hpp
+++ b/tools/chunks/putchunks/producer.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2016,  Regents of the University of California,
+/*
+ * Copyright (c) 2016-2017,  Regents of the University of California,
  *                      Colorado State University,
  *                      University Pierre & Marie Curie, Sorbonne University.
  *
@@ -23,6 +23,7 @@
  * @author Wentao Shang
  * @author Steve DiBenedetto
  * @author Andrea Tosatto
+ * @author Klaus Schneider
  */
 
 #ifndef NDN_TOOLS_CHUNKS_PUTCHUNKS_PRODUCER_HPP
@@ -51,8 +52,8 @@
    */
   Producer(const Name& prefix, Face& face, KeyChain& keyChain,
            const security::SigningInfo& signingInfo, time::milliseconds freshnessPeriod,
-           size_t maxSegmentSize, bool isVerbose = false, bool needToPrintVersion = false,
-           std::istream& is = std::cin);
+           size_t maxSegmentSize, bool isQuiet = false, bool isVerbose = false,
+           bool needToPrintVersion = false, std::istream& is = std::cin);
 
   /**
    * @brief Run the Producer
@@ -91,6 +92,7 @@
   security::SigningInfo m_signingInfo;
   time::milliseconds m_freshnessPeriod;
   size_t m_maxSegmentSize;
+  bool m_isQuiet;
   bool m_isVerbose;
 };
 
