Added server based on nio; added error message field to response