Enhance optimization logger: create directories recursively (#28)