Improve logs folder code.