We also need to detect missing 'body' and/or 'html' start tags.And then we need to inject a new tag at least for the missing 'body' start tag after this forEach().