Fixed byte swapping bug when data file byte order is not the same as the platform