write file in binary mode

--HG--
branch : develop