fixed restore functionality

Had to make loading of files synchronous