Added writeToFile option to the XML settings file