Implementing printing for trace functions