write config file