diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 3a9a3c9..2d75c39 100755
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -397,7 +397,7 @@
             main.cleanup()
             main.exit()
 
-    def log( self, cmdStr, level="",noExit=False):
+    def log( self, cmdStr, level="", noExit=False ):
         """
             log  the commands in the onos CLI.
             returns main.TRUE on success
@@ -405,6 +405,7 @@
             if noExit is True, TestON will not exit, but clean up
             Available level: DEBUG, TRACE, INFO, WARN, ERROR
             Level defaults to INFO
+            if cmdStr has spaces then put quotes in the passed string
         """
         try:
             lvlStr = ""
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 47baeb0..9c9e70d 100755
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -2152,7 +2152,7 @@
             main.cleanup()
             main.exit()
 
-    def logReport( self, nodeIp, searchTerms, outputMode="s" ):
+    def logReport( self, nodeIp, searchTerms, outputMode="s", startStr=None, endStr=None ):
         """
         Searches the latest ONOS log file for the given search terms and
         prints the total occurances of each term. Returns to combined total of
@@ -2169,6 +2169,10 @@
                            number of occurances of each term. Defaults to 's',
                            which prints the simple output of just the number
                            of occurances for each term.
+            * startStr - the start string to be given to stream editor command
+                         as the start point for extraction of data
+            * endStr -  the end string to be given to stream editor command as
+                        the end point for extraction of data
         """
         try:
             main.log.info( " Log Report for {} ".format( nodeIp ).center( 70, '=' ) )
@@ -2182,7 +2186,14 @@
             for termIndex in range( numTerms ):
                 term = searchTerms[termIndex]
                 logLines.append( [term] )
-                cmd = "onos-ssh " + nodeIp + " cat /opt/onos/log/karaf.log | grep " + term
+                if startStr and endStr:
+                    cmd = "onos-ssh {} \"sed -n '/{}/,/{}/p' /opt/onos/log/karaf.log | grep {}\"".format( nodeIp,
+                                                                                                          startStr,
+                                                                                                          endStr,
+                                                                                                          term )
+                else:
+                    cmd = "onos-ssh {} cat /opt/onos/log/karaf.log | grep {}".format( nodeIp,
+                                                                                      term )
                 self.handle.sendline( cmd )
                 self.handle.expect( ":~" )
                 before = self.handle.before.splitlines()
diff --git a/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py b/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
index 800a864..9d049fc 100755
--- a/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
+++ b/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
@@ -41,6 +41,7 @@
         """
 
         import os
+
         main.log.info( "ONOS Single node start " +
                          "Scapy Tool - initialization" )
         main.case( "Setting up test environment" )
@@ -170,10 +171,6 @@
             main.cleanup()
             main.exit()
 
-
-
-
-
     def CASE2( self, main ):
         """
         Discovery the topology using BGPLS
@@ -183,6 +180,7 @@
         import time
 
         main.case( "Testcase 2 : Discovery the Network Topology using BGPLS" )
+        main.ONOScli1.log( "\"testcase2 start\"" )
 
         try:
             from tests.FUNC.FUNCbgpls.dependencies.Nbdata import BgpLs
@@ -218,7 +216,7 @@
         bgplsConfig.Comments()
 
         bgplsConfig.Comments()
-        main.log.info( "Sending BGPLS information " )
+        main.log.info( "Sending BGPLS information" )
         bgplsConfig.Comments()
 
 
@@ -254,19 +252,25 @@
         Poststatus, result = main.ONOSrest.send( '/network/configuration/', method="POST", data=bgpls_post)
         main.step( "Configure BGP through RESTCONF" )
 
-        utilities.assert_equals(
-                expect='200',
-                actual=Poststatus,
-                onpass="Post Port Success",
-                onfail="Post Port Failed " + str( Poststatus ) + "," + str( result ) )
+        utilities.assert_equals( expect='200',
+                                 actual=Poststatus,
+                                 onpass="Post Port Success",
+                                 onfail="Post Port Failed " + str( Poststatus ) + "," + str( result ) )
 
 
         bgplsConfig.Comments()
-        main.log.info( "Check Network devices are Updated in ONOS " )
+        main.step( "Check Network devices are Updated in ONOS " )
         bgplsConfig.Comments()
         time.sleep(15)
-
         response = main.ONOScli1.devices()
+        responseCheck = main.FALSE
+        if response:
+            responseCheck = main.TRUE
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=responseCheck,
+                                 onpass="Network Devices update in ONOS successful",
+                                 onfail="Network Devices update in ONOS failed" )
+
         main.step( "Check the nodes are discovered" )
         if response.find( Ne_id[1][0]) and response.find(Ne_id[1][1]) and response.find(Ne_id[1][2]) != -1:
             stepResult = main.TRUE
@@ -276,8 +280,17 @@
                                  actual=stepResult,
                                  onpass="Node " + str( Ne_id[1][0]) + ( Ne_id[1][1]) + ( Ne_id[1][2]) + "  sucess",
                                  onfail="Node " + str( Ne_id[1][0]) + ( Ne_id[1][1]) + ( Ne_id[1][2]) + " failed" )
+        main.ONOScli1.log( "\"testcase2 end\"" )
 
-
+        main.step( "Check for Errors or Exception in testcase2" )
+        startStr = "testcase2 start"
+        endStr = "testcase2 end"
+        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address,
+                                             ["ERROR","EXCEPT"], "s",
+                                             startStr, endStr )
+        utilities.assert_equals( expect=0, actual=errorLog,
+                                 onpass="No Exception or Error occured in testcase2",
+                                 onfail="Exception or Error occured in testcase2" )
         bgplsConfig.Comments()
         main.log.info( "Kill Scapy process" )
         bgplsConfig.Comments()
@@ -285,9 +298,6 @@
         main.Scapy1.handle.sendline( "\x03" )
         time.sleep( 90 ) #This Sleep time gives time for the socket to close.
 
-
-
-
     def CASE3( self, main ):
         """
         Addition of new Node to existing topology
@@ -297,6 +307,7 @@
         import time
 
         main.case( "Testcase 3: Addition of New Node to existing topology" )
+        main.ONOScli1.log( "\"testcase3 start\"" )
         try:
             from tests.FUNC.FUNCbgpls.dependencies.Nbdata import BgpLs
         except ImportError:
@@ -360,11 +371,17 @@
         bgplsConfig.Comments()
 
         bgplsConfig.Comments()
-        main.log.info( "Check Network devices are Updated in ONOS " )
+        main.step( "Check Network devices are Updated in ONOS" )
         bgplsConfig.Comments()
         time.sleep(120)
-
         response = main.ONOScli1.devices()
+        responseCheck = main.FALSE
+        if response:
+            responseCheck = main.TRUE
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=responseCheck,
+                                 onpass="Network Devices update in ONOS successful",
+                                 onfail="Network Devices update in ONOS failed" )
         main.step( "Check Newly added Node is getting updated" )
 
         if response.find( Ne_id[1][3]) != -1:
@@ -375,13 +392,23 @@
                                  actual=stepResult,
                                  onpass="Node " + str( Ne_id[ 1 ][ 3 ] ) + " update  sucess",
                                  onfail="Node " + str( Ne_id[ 1 ][ 3 ] ) + " update failed" )
+        main.ONOScli1.log( "\"testcase3 end\"" )
+
+        main.step( "Check for Errors or Exception in testcase3" )
+        startStr = "testcase3 start"
+        endStr = "testcase3 end"
+        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address,
+                                             ["ERROR","EXCEPT"], "s",
+                                             startStr, endStr )
+        utilities.assert_equals( expect=0, actual=errorLog,
+                                 onpass="No Exception or Error occured in testcase3",
+                                 onfail="Exception or Error occured in testcase3" )
         bgplsConfig.Comments()
         main.log.info( "Kill Scapy process" )
         bgplsConfig.Comments()
         main.Scapy1.handle.sendline( "\x03" )
         time.sleep( 90 ) #This Sleep time gives time for the socket to close.
 
-
     def CASE4( self, main ):
         """
         Verification of Links in existing topology
@@ -390,6 +417,7 @@
         import time
         import os
         main.case( "Testcase 4: Verification of Links thats is discovered" )
+        main.ONOScli1.log( "\"testcase4 start\"" )
         try:
             from tests.FUNC.FUNCbgpls.dependencies.Nbdata import BgpLs
         except ImportError:
@@ -436,7 +464,7 @@
                                  onpass="Install onos-app-bgp successful",
                                  onfail="Install onos-app-bgp failed" )
         bgplsConfig.Comments()
-        main.log.info( "Checking the Link Discovery Status" )
+        main.step( "Checking the Link Discovery Status" )
         bgplsConfig.Comments()
         time.sleep( 120 )   # Time taken to discovery the links
         response = main.ONOScli1.links()
@@ -445,10 +473,20 @@
 
         if check_link == True:
             reply_Check_Link = main.TRUE
-        utilities.assert_equals( expect= main.TRUE,
-                                     actual=reply_Check_Link ,
-                                     onpass="Link  Discovery Success.",
-                                     onfail="Link  Discovery Failed." )
+        utilities.assert_equals( expect= main.TRUE, actual=reply_Check_Link,
+                                 onpass="Link Discovery Success.",
+                                 onfail="Link Discovery Failed." )
+        main.ONOScli1.log( "\"testcase4 end\"" )
+
+        main.step( "Check for Errors or Exception in testcase4 " )
+        startStr = "testcase4 start"
+        endStr = "testcase4 end"
+        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address,
+                                             ["ERROR","EXCEPT"], "s",
+                                             startStr, endStr )
+        utilities.assert_equals( expect= 0, actual=errorLog,
+                                 onpass="No Exception or Error occured in testcase4",
+                                 onfail="Exception or Error occured in testcase4" )
         bgplsConfig.Comments()
         main.log.info( "Kill Scapy process" )
         bgplsConfig.Comments()
@@ -463,6 +501,8 @@
         import time
         import os
         main.case( "Testcase 5: Deletion of Link in existing topology" )
+
+        main.ONOScli1.log( "\"testcase5 start\"" )
         try:
             from tests.FUNC.FUNCbgpls.dependencies.Nbdata import BgpLs
         except ImportError:
@@ -494,7 +534,7 @@
 
         main.Scapy1.handle.sendline( "sudo python  OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Deletion_Node.py" )
         bgplsConfig.Comments()
-        main.log.info( "Enable BGPlS plugin in ONOS" )
+        main.log.info( "Enable BGPlS plugin in ONOS " )
         bgplsConfig.Comments()
 
         main.step( "UnInstall onos-app-bgp" )
@@ -509,7 +549,7 @@
                                  onpass="Install onos-app-bgp successful",
                                  onfail="Install onos-app-bgp failed" )
         bgplsConfig.Comments()
-        main.log.info( "Checking whether the links is deleted" )
+        main.step( "Checking whether the links is deleted" )
         bgplsConfig.Comments()
         time.sleep( 120 )  # Time taken to discovery the links
         response = main.ONOScli1.links()
@@ -517,10 +557,20 @@
         check_link = bgplsConfig.checkLinks( linksResp )
         if check_link == False:
             reply_Check_Link = main.TRUE
-        utilities.assert_equals( expect= main.TRUE,
-                                     actual=reply_Check_Link ,
-                                     onpass="Link  is Deleted Successfully.",
-                                     onfail="Link  is Deletion Failed." )
+        utilities.assert_equals( expect= main.TRUE, actual=reply_Check_Link,
+                                 onpass="Link is Deleted Successfully.",
+                                 onfail="Link is Deletion Failed." )
+        main.ONOScli1.log( "\"testcase5 end\"" )
+
+        main.step( "Check for Errors or Exception in testcase5" )
+        startStr = "testcase5 start"
+        endStr = "testcase5 end"
+        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address,
+                                             ["ERROR","EXCEPT"], "s",
+                                             startStr, endStr )
+        utilities.assert_equals( expect=0, actual=errorLog,
+                                 onpass="No Exception or Error occured in testcase5",
+                                 onfail="Exception or Error occured in testcase5" )
         bgplsConfig.Comments()
         main.log.info( "Kill Scapy process" )
         bgplsConfig.Comments()
@@ -535,7 +585,8 @@
         import re
         import time
 
-        main.case( "TestCase 5: UnInstalling of app" )
+        main.case( "TestCase 6: UnInstalling of app" )
+        main.ONOScli1.log( "\"testcase6 start\"" )
         try:
             from tests.FUNC.FUNCbgpls.dependencies.Nbdata import BgpLs
         except ImportError:
@@ -575,7 +626,7 @@
         cellResult = main.ONOSbench.setCell( cellName )
 
         bgplsConfig.Comments()
-        main.log.info( "Logging into ONOS CLI " )
+        main.step( "Logging into ONOS CLI " )
         bgplsConfig.Comments()
 
         cliResults = main.ONOScli1.startOnosCli( main.nodes[0].ip_address )
@@ -592,9 +643,20 @@
                                  onpass="Uninstall  onos-app-bgp successful",
                                  onfail="Uninstall  onos-app-bgp failed" )
 
-        main.log.info( "Check for Errors or Exception End of the Script" )
-        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address, ["ERROR",\
-                                            "EXCEPT"] )
-        utilities.assert_equals( expect= 0, actual=errorLog,
+        main.ONOScli1.log( "\"testcase6 end\"" )
+        main.step( "Check for Errors or Exception in testcase6" )
+        startStr = "testcase6 start"
+        endStr = "testcase6 end"
+        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address,
+                                             ["ERROR","EXCEPT"], "s",
+                                             startStr, endStr )
+        utilities.assert_equals( expect=0, actual=errorLog,
+                                 onpass="No Exception or Error occured in testcase6",
+                                 onfail="Exception or Error occured in testcase6" )
+
+        main.step( "Check for Errors or Exception End of the Script" )
+        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address,
+                                             ["ERROR","EXCEPT"] )
+        utilities.assert_equals( expect=0, actual=errorLog,
                                  onpass="No Exception or Error occured",
                                  onfail="Exception or Error occured" )
