added function 'WriteConfigFiles'