change type of 'offset' to off_t to avoid truncation.