adds argparse and exception handling