Add a button which opens a filepanel. Use the filepanel to choose the file to save.
Also slightly adjusted layout.