Make the response writer an interface. Handle return code