Add a switch to enable trace message logging