Rewrite the if-else to switch

Rewrite is_only_digits_arg_q() func
Rewrite print_error() func