Print message when a task is not executed
Remove code duplication