remove bug - write name of file where to replace explicitly