Add a result != S_OK check