changed error behaviour to quit on first exception