log js errors in console instead of throwing them