Fix  task, add logging in task