Refactor base task object and add logging