added general string in file replacement function