But isn't it possible to check if the file is open and if so just skip the registring?