update script
take care of mtime during loop