Add option for task state analysis