error checking on each cmd