Added condition to printing css data to fix missing end tag