How to read/process a binary file as hexadecimal