anchor.diff:  
   
   write_config(Key, Value) ->
  -    Config = [{Key,Value}, {modify_date, erlang:localtime()}
  -                | proplists:delete(modify_date, proplists:delete(Key,ensure_config()))],
  -    write_config(Config).
  +    {ok, Config} = ensure_config(),
  +    Config1 = lists:keystore(Key, 1, Config, {Key, Value}),
  +    Config2 = lists:keystore(modify_date, 1, Config1, {modify_date, erlang:localtime()}),
  +    write_config(Config2).
   
   
   write_config(Config) ->
       {ok, Dev} = file:open(config_file(), [write]),
  -    ok = file:write(Dev, <<
  +    try
  +        ok = file:write(Dev, <<
               "% THIS FILE IS AUTOMATICALLY GENERATED, DO NOT CHANGE WHILE ZOTONIC IS RUNNING.",10,
               "%", 10,
               "% You can change these options when Zotonic is not running.",10,
               "% Delete this file to reset Zotonic to its defaults (when Zotonic is not running).",10,
               "% Consult the config.in file for available options and their defaults.",10,
               10>>),
  -    Data = io_lib:format("~p.~n", [Config]),
  -    ok = file:write(Dev, iolist_to_binary(Data)),
  -    ok = file:close(Dev).
  +        Data = io_lib:format("~p.~n", [Config]),
  +        ok = file:write(Dev, iolist_to_binary(Data))
  +    after
  +        ok = file:close(Dev)
  +    end,
  +    Config.
       
   
   config_file() ->
  
positive.code:                 {ok, Value} ->
                      case Prop of
                          password ->
                              write_config([{Prop, Value} | State#state.config]),
                              {reply, Value, State#state{config=ensure_config()}};
                          _ ->
                              {reply, Value, State}
                      end;
  
negative.code:         Value ->
              {noreply, State};
          _ -> 
              Config = write_config(Key, Value),
              {no_reply, State#state{config=Config}}
      end;
  
  %% @doc Trap unknown casts
  