Added support for proper logging