temp file cleanup code on startup and shutdown