a good practice is to write the following to avoid extra empty lines:

    #set ($discard = $doc.save())