added extra debug logging on ajax calls