Refactor file IO to a Model, and save each time a record is added