refactored argparse handler and file reader