sync disk and cleanup tmp