made it so that save prompt on close can happen