file recovery implementation