Improved require for external execution