Various fixes 3

can you make this `b''` and `mode='wb'`