don't exit the program except in main() - fixes #1
added a comment