Fixed: logging should be initialized when running as a script
Updated: use argparse.FileType to handle the input dump

Also: makes --dump optional
Updated: use an iterable instead of a fileobj