Added option to include function name in diags.