diff --git a/cfg_checker/cfg_check.py b/cfg_checker/cfg_check.py
index 78436d6..b2e3886 100644
--- a/cfg_checker/cfg_check.py
+++ b/cfg_checker/cfg_check.py
@@ -1,6 +1,7 @@
 import argparse
 import os
 import sys
+from logging import INFO,  DEBUG
 
 import reporter
 from cfg_checker.common import utils, const
@@ -19,7 +20,6 @@
         self.print_help()
 
 
-
 def help_message():
     print"""
     Please, use following examples to generate info reports:\n
@@ -61,6 +61,12 @@
 def config_check_entrypoint():
     # Main entrypointр
     parser = MyParser(prog="Cloud configuration checker")
+    parser.add_argument(
+        "-d",
+        "--debug",
+        action="store_true", default=False,
+        help="Set CLI logging level to DEBUG"
+    )
     subparsers = parser.add_subparsers(dest='command')
     # packages
     pkg_parser = subparsers.add_parser(
@@ -107,6 +113,12 @@
     #parse arguments
     args = parser.parse_args()
 
+    # Handle options
+    if args.debug:
+        logger_cli.setLevel(DEBUG)
+    else:
+        logger_cli.setLevel(INFO)
+
     # Execute the command
     result = args.func(args)
 
diff --git a/cfg_checker/common/log.py b/cfg_checker/common/log.py
index af52cac..9b29ba4 100644
--- a/cfg_checker/common/log.py
+++ b/cfg_checker/common/log.py
@@ -79,7 +79,7 @@
         logger.addHandler(fh)
 
     logger_cli = logging.getLogger(name + ".cli")
-    logger_cli.setLevel(logging.DEBUG)
+    logger_cli.setLevel(logging.INFO)
     if len(logger_cli.handlers) == 0:
         logger_cli.addHandler(sh)
 
diff --git a/cfg_checker/pkg_check.py b/cfg_checker/pkg_check.py
index a2f64ac..fe34f60 100644
--- a/cfg_checker/pkg_check.py
+++ b/cfg_checker/pkg_check.py
@@ -21,7 +21,7 @@
 
 class CloudPackageChecker(object):
     def __init__(self):
-        logger_cli.info("Collecting nodes for package check")
+        logger_cli.info("### Collecting nodes for package check")
         # simple salt rest client
         self.salt = salt_utils.SaltRemote()
 
@@ -29,14 +29,14 @@
         # this is not working in scope of 2016.8.3, will overide with list
         # cls.node_keys = cls.salt.list_keys()
 
-        logger_cli.info("Collecting node names existing in the cloud")
+        logger_cli.info("### Collecting node names existing in the cloud")
         self.node_keys = {
             'minions': config.all_nodes
         }
 
         # all that answer ping
         _active = self.salt.get_active_nodes()
-        logger_cli.info("Nodes responded: {}".format(_active))
+        logger_cli.debug("-> Nodes responded: {}".format(_active))
         # just inventory for faster interaction
         # iterate through all accepted nodes and create a dict for it
         self.nodes = {}
@@ -51,7 +51,7 @@
             self.nodes[_name]['role'] = _role
             self.nodes[_name]['status'] = _status
 
-        logger_cli.info("{} nodes collected".format(len(self.nodes)))
+        logger_cli.info("-> {} nodes collected".format(len(self.nodes)))
 
     def collect_installed_packages(self):
         """
@@ -60,7 +60,7 @@
 
         :return: none
         """
-        logger_cli.info("Collecting installed packages")
+        logger_cli.info("### Collecting installed packages")
         # form an all nodes compound string to use in salt
         _active_nodes_string = self.salt.compound_string_from_list(
             filter(
@@ -76,8 +76,8 @@
         _storage_path = os.path.join(
             config.salt_file_root, config.salt_scripts_folder
         )
-        logger_cli.info(
-            "Uploading script {} to master's file cache folder: '{}'".format(
+        logger_cli.debug(
+            "# Uploading script {} to master's file cache folder: '{}'".format(
                 _script_filename,
                 _storage_path
             )
@@ -96,11 +96,11 @@
             _script_filename
         )
 
-        logger.debug("Creating file in cache '{}'".format(_cache_path))
+        logger_cli.debug("# Creating file in cache '{}'".format(_cache_path))
         _result = self.salt.f_touch_master(_cache_path)
         _result = self.salt.f_append_master(_cache_path, _script)
         # command salt to copy file to minions
-        logger.debug("Creating script target folder '{}'".format(_cache_path))
+        logger_cli.debug("# Creating script target folder '{}'".format(_cache_path))
         _result = self.salt.mkdir(
             _active_nodes_string,
             os.path.join(
@@ -109,7 +109,7 @@
             ),
             tgt_type="compound"
         )
-        logger_cli.info("Running script to all active nodes")
+        logger_cli.info("-> Running script to all active nodes")
         _result = self.salt.get_file(
             _active_nodes_string,
             _source_path,
@@ -133,10 +133,11 @@
                 self.nodes[key]['packages'] = _dict
             else:
                 self.nodes[key]['packages'] = {}
-            logger_cli.info("{} has {} packages installed".format(
+            logger_cli.debug("# {} has {} packages installed".format(
                 key,
                 len(self.nodes[key]['packages'].keys())
             ))
+        logger_cli.info("-> Done")
 
     def collect_packages(self):
         """
@@ -161,6 +162,7 @@
 
         :return: buff with html
         """
+        logger_cli.info("### Generating report to '{}'".format(filename))
         _report = reporter.ReportToFile(
             reporter.HTMLPackageCandidates(),
             filename
@@ -169,6 +171,7 @@
             "nodes": self.nodes,
             "diffs": {}
         })
+        logger_cli.info("-> Done")
 
 
 if __name__ == '__main__':
