Minor formatting.
Removed two empty lines.
Added output if sending of the stats failed.