Fixed error that happens when sensor text file ended.