Improved debug logging
Fixed memory leak on connectionDidFailWithError