put cleanup() outside of run and after we're sure none of the data will be used anymore