Added debug logic to the Client object