No change after removing the waitForBytesWritten. The data is always lost at the end of the file and it is never the same amount. It varies between 1-10 K.