use argparse, add --port option

file or directory (also for b)