Added debug logging for Twisted.