Isolate the KeyError