Added endTime writing to file
Added ability to read legacy files without endTime written