added document id logging