added logging for failed http writes