Use proper error code on exit.