make the config read tool more generic