add writing result rules to file rules.rcd