Rename loop_on_exit by loop_at_exit