made function proceed_to_next_stage aware of simulation mode