More debug logging in client

Moved sent counter before the networking operations to eliminate false
positives.