replaced '<< off' with '<< (off >> 32)' and '<< (off & 0xFFFFFFFF)' for platforms with no ostream << int64 overload