Added flag parse and update document.