Added error handler to server