fix bug in update task loop, improve output