fixed _gen_config() to support multiple templates in one file