Make logs folder creation smarter