Change assert to set CFG error