Ensure a valid file is selected if the desired file is missing. Useful when deleting the last file in the list