add break to switch
show the exit code on failure
fix child reaping