Exit with step number for anayltics