Fixed typo in function to write config file.