fix undocache
add saving and loding of files