open file in binary mode for portability