Throw exception when prefix does not exist