file.replace issue when show_changes is False. Fixes #14978