remove writeRaw since write accepts binary data