added os._exit(1) at the end