Add debug logging to Client