Moved up the folder creation
Removed not necessary code