improved debug for tests