Replace string constants with finals.  finish addSegmentToFile method.