Change Fopen mode from text ("w") to binary ("wb")