Call removeTmpFiles within loop.