Change write to writeBlocking / writeReadBlocking