Fix error printing when bad command line options are passed

Change-Id: I04be743b3d05d0689179723a827d7b28c464542f