Clear exit when error occurred