add test of file replace