add file change logic