reconstruct file structure