Hmm perhaps a setTimeout of 0 was ambitious - give it a few ms to realise the file doesn’t exist…