Changed offset_t to long long int (32-bit problem)