         nGpus = strtol(optarg, NULL, 0);
         break;
       case 'b':
-        minBytes = (size_t)parsesize(optarg);
+        parsed = parsesize(optarg);
+        if (parsed < 0) {
+          fprintf(stderr, "invalid size specified for 'minbytes'\n");
+          return -1;
+        }
+        minBytes = (size_t)parsed;
         break;
       case 'e':
-        maxBytes = (size_t)parsesize(optarg);
+        parsed = parsesize(optarg);
+        if (parsed < 0) {
+          fprintf(stderr, "invalid size specified for 'maxbytes'\n");
+          return -1;
+        }
+        maxBytes = (size_t)parsed;
         break;
       case 'i':
         stepBytes = strtol(optarg, NULL, 0);

	    basename(argv[0]));
	return 0;
      default:
        printf("invalid option \n");
	printf("USAGE: %s \n\t"
            "[-t,--nthreads <num threads>] \n\t"
            "[-g,--ngpus <gpus per thread>] \n\t"
            "[-b,--minbytes <min size in bytes>] \n\t"

  setlinebuf(stdout);

  // Parse args
  double parsed;
  int longindex;
  static struct option longopts[] = {
    {"nthreads", required_argument, 0, 't'},
