windows not writing in binary mode