Now handles folder, file naming correctly