added function to save config files