changed check for limiting debug output to substring match