delete trace files and fixed infinite loop