Set up logging before initialization