Added options to stop program after each stage