Moved error handling from write part to the read part.

Also increase the number of nodes to exchange in ShuffleReply.