proper synchronization in write
separate stacks for undo / redo for light virtual files (potentially they can have no document)