Correctly handle logger flushing
Improve UV extraction