implemented a prompt-on-close feature