Added check for the HTTP Code