centralized debug message printing in sw/core