check if I can create a file at the location

Check if I can create a file at the location where the file should be restored.

fix #11472 

cc @villafanez @rperezb