improved the logging output