add swapdir and undodir