Getting seg_len from file