added offline error handling for rules