Taking into account document selection and blacklist mode.