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;
 };
 
