added default output dir
better argument parsing