made appropriate error handling in requirejs load plugins