Modified the logging