Make the notepad ask for confirmation before closing