improve support for logging