Add function for parsing data file