adding err catch to newrelic script