mode wb for output file