task execution and log refactor