read_rules function

Read rules from a file