graceful handling of script loading errors