moving wrapInTryCatch to Shield.js