Inject local jQuery, improve error handling