Changing deprecated Logger.warn to Logger.warning