Some logging improvements.