waitForBytesWritten were deleted and bytesWritten signal were used