Function restoreFiles