Added logic to folder creation