Since you don't seem to be using Tkinter after your file dialog, you could do root.destroy()to close the Tk root window right after you have the user select a file.
root.destroy()