handles execution errors