Add recover-by-file function