update the document and check for empty packages.