add debug for expect.