does the Write ensure wrote all bytes supplied?