only close span-tag if it had been opened
removed useless code

leaving select-case statement for easy extending for other projects
Merge pull request #2 from se4598/master

fix generated report-text