write trace