Added newrelic support
Added max length check