diff --git a/tools/dissect/main.cpp b/tools/dissect/main.cpp
index fb14692..a7d1e3e 100644
--- a/tools/dissect/main.cpp
+++ b/tools/dissect/main.cpp
@@ -32,10 +32,9 @@
 namespace po = boost::program_options;
 
 static void
-usage(std::ostream& os, const std::string& appName, const po::options_description& options)
+usage(std::ostream& os, const std::string& programName, const po::options_description& options)
 {
-  os << "Usage:\n"
-     << "  " << appName << " [input-file] \n"
+  os << "Usage: " << programName << " [options] [input-file]\n"
      << "\n"
      << options;
 }
@@ -45,7 +44,7 @@
 {
   std::string inputFileName;
 
-  po::options_description visibleOptions;
+  po::options_description visibleOptions("Options");
   visibleOptions.add_options()
     ("help,h",    "print help and exit")
     ("version,V", "print version and exit")
@@ -67,8 +66,7 @@
     po::notify(vm);
   }
   catch (const po::error& e) {
-    std::cerr << "ERROR: " << e.what() << std::endl << std::endl;
-    usage(std::cerr, argv[0], visibleOptions);
+    std::cerr << "ERROR: " << e.what() << "\n";
     return 2;
   }
 
@@ -78,24 +76,21 @@
   }
 
   if (vm.count("version") > 0) {
-    std::cout << "ndn-dissect " << tools::VERSION << std::endl;
+    std::cout << "ndn-dissect " << tools::VERSION << "\n";
     return 0;
   }
 
   std::ifstream inputFile;
-  std::istream* inputStream;
+  std::istream* inputStream = &std::cin;
 
   if (vm.count("input-file") > 0 && inputFileName != "-") {
     inputFile.open(inputFileName);
-    if (!inputFile.is_open()) {
-      std::cerr << argv[0] << ": " << inputFileName << ": File does not exist or is unreadable" << std::endl;
+    if (!inputFile) {
+      std::cerr << argv[0] << ": " << inputFileName << ": File does not exist or is unreadable\n";
       return 3;
     }
     inputStream = &inputFile;
   }
-  else {
-    inputStream = &std::cin;
-  }
 
   NdnDissect program;
   program.dissect(std::cout, *inputStream);
diff --git a/tools/dissect/ndn-dissect.cpp b/tools/dissect/ndn-dissect.cpp
index 907eef6..4971d03 100644
--- a/tools/dissect/ndn-dissect.cpp
+++ b/tools/dissect/ndn-dissect.cpp
@@ -118,9 +118,9 @@
   if (block.elements().empty()) {
     os << " [[";
     name::Component(block.value(), block.value_size()).toUri(os);
-    os<< "]]";
+    os << "]]";
   }
-  os << std::endl;
+  os << "\n";
 
   util::IndentedStream os2(os, "  ");
   std::for_each(block.elements_begin(), block.elements_end(),
@@ -130,13 +130,16 @@
 void
 NdnDissect::dissect(std::ostream& os, std::istream& is)
 {
-  while (is.peek() != std::char_traits<char>::eof()) {
-    try {
-      printBlock(os, Block::fromStream(is));
+  size_t offset = 0;
+  try {
+    while (is.peek() != std::istream::traits_type::eof()) {
+      auto block = Block::fromStream(is);
+      printBlock(os, block);
+      offset += block.size();
     }
-    catch (const std::exception& e) {
-      std::cerr << "ERROR: " << e.what() << std::endl;
-    }
+  }
+  catch (const std::exception& e) {
+    std::cerr << "ERROR: " << e.what() << " at offset " << offset << "\n";
   }
 }
 
