open lexer file with binary mode