Forced external JS lib to be loaded via HTTPS
Slightly more smart error checking