pass right document to save doc
error status test