check for KeyError during usage calculation added