Fix logging happening before the logs dir exists