Added a command-line flag to enable debugging, and set default loglevel to
'WARN'