Use argparse instead of reading sys.argv directly