an class="comment">% Write the file</span>
0069         fid = fopen(file_name, <span class="string">'wt'</span>);
0070         <span class="keyword">if</span> fid == -1
0071             <span class="comment">% file cannot be created/updated - use prefdir if file does not already exist</span>
0072             <span class="comment">% (if file exists but is simply not writable, don't create a duplicate in prefdir)</span>
0073             <span class="keyword">if</span> ~exist(file_name,<span class="string">'fi