Add explicit exit to main.