changed error handler res.send to fix express deprecation warnings