Fixed bug which caused settings files to not be saved on close.
Removed leftover debugging output.