added check for rule existence based on rule name before delete