added some debug traces
added the TaskState class
fixed gmb termination status