Handle errors in task runner