check argc value before accessing argv[2]
check control value before using it