Added extra header for HTTP request and extra logging when things go wrong