Update mainfile