Actually you also want to do this at the beginning rather than at the end. Look at where we remove unit-tests.log