added automatic save - option (saves after each stopped run)
replace dataitem.times with function dataitem.GetTimes() which returns size of history