added -d flag to keep diag running, added apache commons-cli