Record traces on a text file