Correctly check for node_modules and .js

Handle load error better
Add spinner