Added check for target machine endian-ness and put the result into