Shutdown ensures complete checkpoint before closing the database.