added command line interface to collectdata.py