Fix file.replace bug when replacement str is numeric