Some logging improvements + formatting fixes