add TODO: Call TaskManager to kill all tasks
add exception catch