Close before cleanup.