struct file to layout