Added function for reading data files