break in main instead of exit, for portability