Added support for logging