new printTrace method