added exittoscannerwithprompt