replace sys.exit(0) to avoid backtrace