write to config