Add comment and use updateManifest in case manifest is null
Add updateManifest test case