diff --git a/tools/ndns-dig.cpp b/tools/ndns-dig.cpp
index 29afa4f..36fea64 100644
--- a/tools/ndns-dig.cpp
+++ b/tools/ndns-dig.cpp
@@ -240,7 +240,7 @@
 
     po::options_description config("Configuration");
     config.add_options()
-      ("timeout,T", po::value<int>(&ttl), "waiting seconds of query. default: 4 sec")
+      ("timeout,T", po::value<int>(&ttl), "query timeout. default: 4 sec")
       ("rrtype,t", po::value<std::string>(&rrType), "set request RR Type. default: TXT")
       ("dstFile,d", po::value<std::string>(&dstFile), "set output file of the received Data. "
        "if omitted, not print; if set to be -, print to stdout; else print to file")
@@ -262,7 +262,7 @@
     config_file_options.add(config).add(hidden);
 
     po::options_description visible("Usage: ndns-dig /name/to/be/resolved [-t rrType] [-T ttl]"
-                                    "[-d dstFile]\n"
+                                    "[-d dstFile] [-s startZone] [-n]\n"
                                     "Allowed options");
 
     visible.add(generic).add(config);
@@ -278,6 +278,12 @@
       return 0;
     }
 
+    if (!vm.count("name")) {
+      std::cerr << "must contain a target label parameter." << std::endl;
+      std::cerr << visible << std::endl;
+      return 1;
+    }
+
     if (!start.isPrefixOf(dstLabel)) {
       std::cerr << "Error: start zone " << start << " is not prefix of the target label "
                 << dstLabel << std::endl;
@@ -298,21 +304,30 @@
     return 1;
   }
 
-  NDNS_LOG_TRACE("validateIntermediate=" << shouldValidateIntermediate);
+  try {
+    ndn::ndns::NdnsDig dig("", dstLabel, ndn::name::Component(rrType), shouldValidateIntermediate);
+    dig.setInterestLifetime(ndn::time::seconds(ttl));
+    dig.setDstFile(dstFile);
 
-  ndn::ndns::NdnsDig dig("", dstLabel, ndn::name::Component(rrType), !shouldValidateIntermediate);
-  dig.setInterestLifetime(ndn::time::seconds(ttl));
-  dig.setDstFile(dstFile);
+    // Due to ndn testbed does not contain the root zone
+    // dig here starts from the TLD (Top-level Domain)
+    // precondition is that TLD : 1) only contains one component in its name; 2) its name is routable
+    dig.setStartZone(start);
 
-  // Due to ndn testbed does not contain the root zone
-  // dig here starts from the TLD (Top-level Domain)
-  // precondition is that TLD : 1) only contains one component in its name; 2) its name is routable
-  dig.setStartZone(start);
+    dig.run();
 
-  dig.run();
-
-  if (dig.hasError())
+    if (dig.hasError())
+      return 1;
+    else
+      return 0;
+  }
+  catch (const ndn::ValidatorConfig::Error& e) {
+    std::cerr << "Fail to create the validator: " << e.what() << std::endl;
     return 1;
-  else
-    return 0;
+  }
+  catch (const std::exception& e) {
+    std::cerr << "Error: " << e.what() << std::endl;
+    return 1;
+  }
+
 }
