Changed packet length to smaller and added explicit flush.

This was due to problem, where for some reason first 8kB or 4kB packet was never delivered to logging service. Couldn't reproduce problem.