file recovery and junit tests