Improved file restoration