write config