added document-lookup failure handler