diff --git a/TestON/tests/SCPFmaxIntents/Dependency/maxIntentFunctions.py b/TestON/tests/SCPFmaxIntents/Dependency/maxIntentFunctions.py
index 128ef6b..87f2015 100644
--- a/TestON/tests/SCPFmaxIntents/Dependency/maxIntentFunctions.py
+++ b/TestON/tests/SCPFmaxIntents/Dependency/maxIntentFunctions.py
@@ -21,11 +21,9 @@
         main.CLIs[0].handle.expect("onos>", timeout=timeout)
         raw = main.CLIs[0].handle.before
         intents = int(main.CLIs[0].handle.before.split()[7])
-        main.log.info(state + "intents: " + str(intents))
+        main.log.info(state + " intents: " + str(intents))
     except pexpect.TIMEOUT:
-        main.log.exception("Timeout exception found")
-    except pexpect.EOF:
-        main.log.error("EOF exception found")
+        main.log.exception("Timeout exception caught in getIntent")
     return intents
 
 def getFlows( main, state="ADDED", sleep=1, timeout=120 ):
@@ -40,11 +38,9 @@
         main.CLIs[0].handle.expect("onos>", timeout=timeout)
         raw = main.CLIs[0].handle.before
         flows = int(main.CLIs[0].handle.before.split()[7])
-        main.log.info(state + "flows: " + str(flows))
+        main.log.info(state + " flows: " + str(flows))
     except pexpect.TIMEOUT:
-        main.log.exception("Timeout exception found")
-    except pexpect.EOF:
-        main.log.error("EOF exception found")
+        main.log.exception("Timeout exception caught in getFlows")
     return flows
 
 
@@ -73,9 +69,7 @@
         if "Failure:" not in raw and "GC" not in raw:
             return main.TRUE
     except pexpect.TIMEOUT:
-        main.log.exception("Timeout exception found")
-    except pexpect.EOF:
-        main.log.error("EOF exception found")
+        main.log.exception("Timeout exception caught in pushIntents")
     return main.FALSE
 
 def verifyFlows( main, expectedFlows, state="ADDED", sleep=1,  timeout=120):
diff --git a/TestON/tests/SCPFmaxIntents/SCPFmaxIntents.params b/TestON/tests/SCPFmaxIntents/SCPFmaxIntents.params
index b0df3e9..a4231d9 100755
--- a/TestON/tests/SCPFmaxIntents/SCPFmaxIntents.params
+++ b/TestON/tests/SCPFmaxIntents/SCPFmaxIntents.params
@@ -4,7 +4,7 @@
     # 11-mininet setup, 20-pushing intents,
     # 21-rerouting intents
     # 0,1,10,20,1,11,20,1,10,21,1,11,21,100
-    <testcases>0,1,11,20,1,11,21,100</testcases>
+    <testcases>0,1,11,20,1,11,21,1,10,20,1,10,21,100</testcases>
 
     <SCALE>
         <size>1</size>
@@ -48,8 +48,8 @@
 
     <TEST>
         <batch_size>1000</batch_size>
-        <min_intents>500000</min_intents>
-        <max_intents>3000</max_intents>
+        <min_intents>800000</min_intents>
+        <max_intents>1000000</max_intents>
         <check_interval>10000</check_interval>
     </TEST>
 
diff --git a/TestON/tests/SCPFmaxIntents/SCPFmaxIntents.py b/TestON/tests/SCPFmaxIntents/SCPFmaxIntents.py
index 9766db0..e18d746 100644
--- a/TestON/tests/SCPFmaxIntents/SCPFmaxIntents.py
+++ b/TestON/tests/SCPFmaxIntents/SCPFmaxIntents.py
@@ -166,7 +166,7 @@
             temp = "'" + commit + "',"
             temp += "'" + nic + "',"
             temp += str(main.numCtrls) + ","
-            temp += "'" + node + "1" + "',"
+            temp += "'" + node + "1" + "'"
             dbfile.write(temp)
             dbfile.close()
         except IOError:
@@ -371,7 +371,7 @@
             expectedIntents = offset
             expectedFlows += main.batchSize*2
 
-            if offset >= main.minIntents and offset % main.checkInterval == 0:
+            if offset >= main.minIntents and offset % main.checkInterval == 0 or expectedIntents == main.maxIntents:
                 # Verifying intents
                 main.log.step("Verifying intents")
                 main.log.info("Expected intents: " + str(expectedIntents))
@@ -409,14 +409,14 @@
         main.log.report("Done pushing intents")
         main.log.info("Summary: Intents=" + str(expectedIntents) + " Flows=" + str(expectedFlows))
         main.log.info("Installed intents: " + str(maxIntents) +
-                      "\nAdded flows: " + str(maxFlows))
+                      " Added flows: " + str(maxFlows))
 
         main.log.info("Writing results to DB file")
         try:
             dbFileName="/tmp/MaxIntentDB"
             dbfile = open(dbFileName, "a")
-            temp = str(maxIntents) + ","
-            temp += str(maxFlows) + ","
+            temp = "," + str(maxIntents)
+            temp += "," + str(maxFlows)
             dbfile.write(temp)
             dbfile.close()
         except IOError:
@@ -543,13 +543,13 @@
         main.log.report("Done pushing intents")
         main.log.info("Summary: Intents=" + str(expectedIntents) + " Flows=" + str(expectedFlows))
         main.log.info("Installed intents: " + str(maxIntents) +
-                      "\nAdded flows: " + str(maxFlows))
+                      " Added flows: " + str(maxFlows))
 
         try:
             dbFileName="/tmp/MaxIntentDB"
             dbfile = open(dbFileName, "a")
-            temp = str(maxIntents) + ","
-            temp += str(maxFlows) + "\n"
+            temp = "," + str(maxIntents)
+            temp += "," + str(maxFlows)
             dbfile.write(temp)
             dbfile.close()
         except IOError:
