Replaced calls to exit() with wfAbruptExit().