Added support for logging and a simple logging configuration file.