reconstruct the file stucture