add event for error_out and state of errored. Catch event and stop stepping loop