also prune temp. directory at end