support config loading based on mode