tried adding a DataFile class. Added logic to open read close previous data.