diff: refactor tempfile cleanup handling