Better logging of curl errors.
Merge commit 'cc50d' into develop