STREAMS-129| Updated error handling in task
STREAMS-130 | Updated isRunning logic