script load error handling