added optional --loglevel command line argument, default to INFO