Fix a problem: if a linq step return a error, all will deadlock.
Enhance debug function