Add open mode to stream so I can access that in text file, don't like how hacky this is, and I don't like the way I did locked mode in text file, need to revisit that.