use total file replace for update as well as gsub does not play well