Wait for container to exit