trim response message of garbage collection
change message trim
change format of debug message
use curl_getinfo() instead of curl_error()