diff --git a/cluster-mgmt/bin/cho-link-failure.py b/cluster-mgmt/bin/cho-link-failure.py
index 7c9740e..62c3933 100755
--- a/cluster-mgmt/bin/cho-link-failure.py
+++ b/cluster-mgmt/bin/cho-link-failure.py
@@ -7,12 +7,12 @@
 import time
 
 flowdef="flowdef_8node_252.txt"
-basename="onosdevz"
+basename="onosdevt"
 operation=["sw3-eth4 down","sw4-eth4 down","sw4-eth3 down","sw3-eth4 up","sw1-eth2 down","sw4-eth4 up","sw4-eth3 up","sw1-eth2 up"]
 
 def check_by_pingall():
   buf = ""
-  cmd = "dsh -w %s1 \"cd ONOS/web; ./pingallm.py %s\"" % (basename, flowdef)
+  cmd = "pingall-speedup.sh %s" % (flowdef)
   result = os.popen(cmd).read()
   buf += result
   
@@ -50,27 +50,66 @@
   f.write(buf)
   f.close()
 
-def check_rest(cycle, n):
-  url="http://%s:%s/wm/core/topology/switches/all/json" % (RestIP, RestPort)
-  filename  = "rest-sw-log.%d.%d.log" % (cycle, n)
+def dump_flowgetall(tag):
+  url="http://%s:%s/wm/flow/getall/json" % (RestIP, RestPort)
+  filename  = "rest-flow-getall-log.%s.log" % tag
   dump_json(url, filename)
 
-  filename  = "rest-link-log.%d.%d.log" % (cycle, n)
+def check_rest(tag):
+  url="http://%s:%s/wm/flow/getall/json" % (RestIP, RestPort)
+  filename  = "rest-flow-getall-log.%s.log" % tag
+  dump_json(url, filename)
+
+  url="http://%s:%s/wm/core/topology/switches/all/json" % (RestIP, RestPort)
+  filename  = "rest-sw-log.%s.log" % tag
+  dump_json(url, filename)
+
   url = "http://%s:%s/wm/core/topology/links/json" % (RestIP, RestPort)
+  filename  = "rest-link-log.%s.log" % tag
   dump_json(url, filename)
 
   url = "http://%s:%s/wm/registry/switches/json" % (RestIP, RestPort)
-  filename  = "rest-reg-sw-log.%d.%d.log" % (cycle, n)
+  filename  = "rest-reg-sw-log.%s.log" % tag
   dump_json(url, filename)
 
   url = "http://%s:%s/wm/registry/controllers/json" % (RestIP, RestPort)
-  filename  = "rest-reg-ctrl-log.%d.%d.log" % (cycle, n)
+  filename  = "rest-reg-ctrl-log.%s.log" % tag
   dump_json(url, filename)
 
   url = "http://%s:%s/wm/flow/getsummary/0/0/json" % (RestIP, RestPort)
-  filename  = "rest-flow-log.%d.%d.log" % (cycle, n)
+  filename  = "rest-flow-getsummary-log.%s.log" % tag
   dump_json(url, filename)
 
+
+def check_and_log(tag):
+  print "check by pingall"
+  (code, result) = check_by_pingall()
+  if code == 0:
+    print "ping success %s" % (result)
+  else:
+    print "pingall failed"
+    print "%s" % (result)
+    error = "error-log.%s.log" % tag
+    rawflow  = "raw-flow-log.%s.log" % tag
+    
+    ferror = open(error, 'w')
+    ferror.write(result)
+
+    fraw = open(rawflow,'w')
+    fraw.write(check_flow_raw()[1])
+    fraw.close()
+
+    check_rest(tag)
+
+    ferror.write(check_switch()[1])
+    ferror.write(check_link()[1])
+    ferror.write(check_switch_local()[1])
+    ferror.write(check_controllers(8)[1])
+    ferror.close()
+
+  return code
+
+
 if __name__ == "__main__":
   print "%s" % check_switch()[1]
   print "%s" % check_link()[1]
@@ -79,38 +118,25 @@
   print result
   k = raw_input('hit any key>')
 
-
   for cycle in range(1000):
     for n, op in enumerate(operation):
-      print "==== Cycle %d operation %d ====" % (cycle, n)
+      print "==== Cycle %d operation %d ====: %s" % (cycle, n, os.popen('date').read())
       link_change_core(op)
       print "wait 30 sec"
       time.sleep(30)
-      print "check by pingall"
-      (code, result) = check_by_pingall()
-      if code == 0:
-        print "ping success %s" % (result)
-      else:
-        print "pingall failed (%d, %d). Collecting logs" % (cycle, n)
-        error = "error-log.%d.%d.log" % (cycle, n)
-        nmapflow  = "nmap-flow-log.%d.%d.log" % (cycle, n)
-        rawflow  = "raw-flow-log.%d.%d.log" % (cycle, n)
-
-        f = open(error, 'w')
-        f.write(result)
-        f.write(check_switch()[1])
-        f.write(check_link()[1])
-        f.write(check_switch_local()[1])
-        f.write(check_controllers(8)[1])
-        f.close()
-
-        f = open(nmapflow,'w')
-        f.write(check_flow_nmap()[1])
-        f.close()
-
-        f = open(rawflow,'w')
-        f.write(check_flow_raw()[1])
-        f.close()
-        check_rest(cycle,n)
-
-    
+      print "check and log: %s" % os.popen('date').read()
+      code = check_and_log("%d.%d.1" % (cycle,n))
+      print "done: %s" % os.popen('date').read()
+      if not code == 0:
+        print "wait another 60 sec"
+        time.sleep(60)
+        print "check and log: %s" % os.popen('date').read()
+        code = check_and_log("%d.%d.2" % (cycle,n))
+        print "done: %s" % os.popen('date').read()
+        if code == 0:
+          tag = "%d.%d.2" % (cycle,n)
+          dump_flowgetall(tag)
+          rawflow  = "raw-flow-log.%s.log" % tag
+          fraw = open(rawflow,'w')
+          fraw.write(check_flow_raw()[1])
+          fraw.close()
