class:write to disk seperate from mainwindows

trade part unwork