Adding support for logging to console and log files.