Added DSM trace to template.php