anchor.diff:      {error, Reason1} -> throw({error, {create_path_failed,ConfigPath,Reason1}})
     end,
   
  -  Opts = [binary,append,exclusive,raw],
  +  Opts = [binary,write,exclusive,raw],
   
     {ok, ConfigFd} = case file:open(ConfigPath, Opts) of
       {ok, CFile_} -> {ok, CFile_};
  
positive.code:   end,
  
    Opts = case Mode of
      append -> [binary,append,raw];
      read -> [binary,read,raw]
    end,
  
  
negative.code:       E
    end,
  
    {ok, ConfigPos} = file:position(ConfigFd, eof),
    Columns = [Column || {Column,_} <- Value],
    EOF = Begin + 25*60*(4 + 8*length(Columns)),
    Source = #source{source_id = length(Sources), name = Name, columns = Columns, 
      start_of_block = Begin, end_of_block = EOF,
      data_offset = Begin, data_offset_ptr = ConfigPos + 3},
    Bin = encode_config(Source),
    ok = file:pwrite(ConfigFd, ConfigPos, Bin),
    {ok, DB#db{sources = Sources ++ [Source]}}.
  
  
  