Code for recovering files after hard reset