rm tmp file after generating stats