Usually it will already fail when opening, but reads can also fail since PHP 7.4, in which case we still need to place the file handle in open_files to make sure the destructor will run on it.