Robust send training data

Just in case the user unplugs the USB stick between the
transfer started and it reached the training data upload
bit.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>