support to load scripts and handle runtime errors