Refine the sweep tool to avoid deleting the used files.