some logging improvements