further improved logging