Refactored the code so that it creates one xml file for all input traces