Move tmp file reading code in DataStore struct