extrating read_config for its own package