Update source.cpp

Changin to binary write mode