Improved error handling
Added option to customize folder name