updated for cowboy 1.0.0
Added logging for console errors.