Renamed spec.
Added error checking when result is not ok.