flatten file hierarchy