Lab5 for CSC223 w/ reading and writing to file