factor out file reading to own method
make readfile private and have it write to a given interface{}
factor out file writing to separate function
crash when saving fails so no more unsaved changes are made