improving logic and messages in CfgRepoFactory