was trying to persist the sensor reading before it was actually read from the file