config: added function WriteConfigFile

Closes #1.