logging improvements