write config from script