Added checker for status codes received from the server