Use argparse and python logging

I also changed run.sh a little bit.