Use tracefn instead of sprintf >> trace.