Better error handling for browserify, no more crashes on js errors