Updated AppInsights script