Added unsaved changes warning on close.