cleanup; add prunePattern