Wrap verify file id condition in Check call (#6085)