add a running variable.
add more debug info
refine debug