if args are invalid, exit