flattening file structure