Wrote function to read file.  See comments for future changes