fix OptionsPattern[] bug
implement BinaryRead and BinaryWrite