now reading file will save undo state
prevent from calling callback if it is not existed