refact file struct