Added success status code check method