switch to r+ from w+ to not overwrite
when reopening use w+ to truncate
forgot what w+x actually does, added tests to see if we can actually write to the file