improved the logging slightly.