add undohistory to file