refined the error checking for the min length

try to convert to Integer(args[2]) and fail,
if it's not possible