Read data file into a struct