Updated config loading logic.