Output files to several directories
based on the key in a DList[(K, V)]