Is it possible check any thing inside exit function and if need is it possible to disable tha back anad stay in the current ?