Changing tiir-specific config lookup to a lookup on a passed-in variable, with exception handling