Implements error handling when adding new rule