changing to "flatten" & "dirname"-files