Remove os.Exit() calls in functions besides Main(), pass errors through instead