Added code to correctly throw a PluginError if a script file can not be found.