Add a script that asks for confirmation before closing.