fix pipeline bugs which close the transfermanager before end processing
remove debug code