cmd: A little error checking.