Renamed write_replace to write_replace_global since it is a global write and replace