function feedback = saveFibre(CFibre,FileName)
%function feedback = saveFibre(CFibre,FileName)
%saves the fiber data file feedback =0 if OK, else 1

freadid=fopen(FileName,'r');
if freadid==-1
   %file doens't exist so can write with this name
   fwriteid = fopen(FileName,'w');
   if (fwriteid == -1) 
      disp('Error trying to open file for binary writing');
      feedback = 1;
   else
      CFibre = fwrite(fwriteid,CFibre,'double');
      status = fclose(fwriteid);
      feedback = 0;
   end
else
   %file exists already!
   fclose(freadid);
   disp('File already exists - choose another names')
   feedback = 1;
end
