log errors in js

log errors