added write binary for windows