Write files in binary mode