adding write_config