update mainfile