return exit code on exit from main