Evaluate return value from u_option_context_parse()
diff --git a/src/wsman.c b/src/wsman.c
index 0b4de46..a73697b 100644
--- a/src/wsman.c
+++ b/src/wsman.c
@@ -359,11 +359,16 @@
 	retval = u_option_context_parse(opt_ctx, &argc, &argv, &error);
 	u_option_context_free(opt_ctx);
 
-	if (error) {
+	if (retval == 0) {
+          if (error) {
 		if (error->message)
-			printf("%s\n", error->message);
+			fprintf(stderr, "%s\n", error->message);
 		u_error_free(error);
-		return FALSE;
+          }
+          else {
+		fprintf(stderr, "Can't parse context information\n");
+          }
+          return FALSE;
 	}
 
 	if (my_version) {