fixed duplication of new string in output files