- Concluded implementation of writefile, now the changes are saved back into the original file.