refactoring: performance improvement - only instrument those scripts that require it