Fix invalid return value of read_offset_from_file