Extract configs to config file