Move argument parsing into main() and only execute it if it is __main__