remove sys.exit in hook