Added reminder logic on the window when closing.