Made game exiting and cleaning up more flexible. Provided so far unused exit-on-error function.