fix memcpy bug in ReadFromTask().
Changes in logging.
First review with Matevz.