Sketched out read_file function