reading endianess from dat file