Moved the condition inside TraceMessages to make it more DRY. It's one extra function call compared to if I check it before calling the TraceMessages.