Made sure file is being opened for reading only
Greatly improved segmentation algorithm by using DTW to map smoothed curve onto original