sync before we shut down