updatefiles fixed to run properly