add support for failed tasks