Changed read_file2mem to use binary mode