reconstruct the file structure