Added debug logging
Change to response handler
Merge