You should add a TODO to handle the case when the folder already exists.
(appending "-[number]" to the name until it doesn't collide should work).