Fix typos and removed unnecessarily logging.
Make separate measurement for the time spent on making the attribute xml.