rebuild file struct