<s>[INST] import tkinter as tk

class Application(tk.Frame):
    def __init__(self, master=None):
        super().__init__(master)
        self.master = master
        self.pack()
        self.create_widgets()

    def create_widgets(self):
        self.hi_there = tk.Button(self)
        self.hi_there["text"] = "Hello World\n(click me)"
        self.hi_there["command"] = self.say_hi
        self.hi_there.pack(side="top")

        self.quote = tk.Button(self)
        self.quote["text"] = "Quote\n(click me)"
        self.quote["command"] = self.say_quote
        self.quote.pack(side="top")

    def say_hi(self):
        print("hi there, everyone!")

    def say_quote(self):
        print("They are at peace, like a mountain in the sky")

root = tk.Tk()
app = Application(master=root)
app.mainloop()

This code is a simple GUI application that contains two buttons. The first button prints the phrase "hi there, everyone!" when clicked, and the second button prints the phrase "They are at peace, like a mountain in the sky" when clicked. 

However, the code doesn't handle the case where the user closes the window by clicking the close button, rather than exiting the app by any other means. How can I modify the code to do something when the window is closed in this way?[/INST]