Put call to os.Exit only at top-most level