changed to avoid empty folders