Finish document.