Handle the (unlikely) case that the file is deleted in between. Suggested by Harald Oehlmann (Thanks!)