implementing restoreFromFile