basic reading/writing

Very brittle. Need to fix appending to certain points, and hard coded file names.