check doc existence