add codes to makedirs if logs folder doesn't exist