fixed binary/ascii file bug on windows