Replace panic with exit 1.