Made the script easier to run. Added argparse command line flag support. Improved logging method