Program now terminates only at the end of a step if successful.