Use .buffer when writing bytes