removing debug output
fixing potential infinite loop and implementing successive and increasing severity task termination attempts after predefined timeout