Change back to original idea to exit non-zero in exit event handler