added verbose and debug flags, updating the log level accordingly