Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp	(revision 30402)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp	(revision 30403)
@@ -929,15 +929,23 @@
             CHECK_ERROR(machine, GetStorageControllerByName(Bstr(pszCtl), ctl.asOutParam()));
 
-            if (!RTStrICmp(pszHostIOCache, "on"))
-            {
-                CHECK_ERROR(ctl, COMSETTER(UseHostIOCache)(TRUE));
-            }
-            else if (!RTStrICmp(pszHostIOCache, "off"))
-            {
-                CHECK_ERROR(ctl, COMSETTER(UseHostIOCache)(FALSE));
-            }
-            else
-            {
-                errorArgument("Invalid --hostiocache argument '%s'", pszHostIOCache);
+            if (SUCCEEDED(rc))
+            {
+                if (!RTStrICmp(pszHostIOCache, "on"))
+                {
+                    CHECK_ERROR(ctl, COMSETTER(UseHostIOCache)(TRUE));
+                }
+                else if (!RTStrICmp(pszHostIOCache, "off"))
+                {
+                    CHECK_ERROR(ctl, COMSETTER(UseHostIOCache)(FALSE));
+                }
+                else
+                {
+                    errorArgument("Invalid --hostiocache argument '%s'", pszHostIOCache);
+                    rc = E_FAIL;
+                }
+            }
+            else
+            {
+                errorArgument("Couldn't find the controller with the name: '%s'\n", pszCtl);
                 rc = E_FAIL;
             }
