Change Rules to text file