Add alert when closing window