Add read and write rules to cfg file