added error checking for argument lengths

Signed-off-by: Stuart Long <srl51@case.edu>