Added slightly more error-handling to the server.