There may be some confusion with the names, designFile and designfile are 2 separate variables since R is case-sensitive.
designFile <- "/proj/desk/design.scs"
Here designFile contains the path to the file.
designFile <- readLines(designFile)
Now you rewrite the variable designFile with the contents of the file. The path is not saved anywhere anymore.
filename = designfile
fConn <- file(filename,open="w")
if designFile and designfile are the same, then it means you're trying to create a file called "+ cor_zgdiode = sigma", then a second file called "+ corner_sigma = 3" etc... File names with spaces, "+" and "=" should probably be avoided, and depending on the operating system, will not work at all.
If you just want to save your modified file, you don't need a loop at all, you can simply do:
file_path <- "/my/path.scs"
new_path <- "/my/path_modif.scs"
file_content <- readLines(file_path)
modified_content <- do_things(file_content)
writeLines(modified_content, new_path)
(also, are you sure about your sep="", that will make a result file with a single big line, doesn't sound like a good idea in general).