better handling of log messages (internal stuff only)