added missing exit after error