Update main.c

Use exit() instead of return