Corrected to binary mode file open.