fixed makedirs issue