Don't Exit() when there is an error, that's not very fair.
Corrected sample code.