js processing errors

Three lines added to make the error handling of JS. This causes the script to continue running and show where the error was (same as LESS files).