Cancel the error event so user can fully control system exit, minor refactors.