anchor.diff:                      Res = storage_files_manager:write(Storage_helper_info, FileId, Offset, Buf),
                       case {is_integer(Res), event_production_enabled("write_event")} of
                           {true, true} ->
  +                            % async infrom other providers about modification
  +                            apply(fun() -> mark_as_modified(File, Offset, byte_size(Buf)) end,[]), %todo get this info from events
  +
                               WriteEvent = [{"type", "write_event"}, {"user_dn", fslogic_context:get_user_dn()},
                                   {"count", Res}, {"blocks", [{Offset, Res}]}],
                               gen_server:call(?Dispatcher_Name, {cluster_rengine, 1, {event_arrived, WriteEvent}}),
  
positive.code:                     Res = storage_files_manager:write(Storage_helper_info, FileId, Buf),
                      case {is_integer(Res), event_production_enabled("write_event")} of
                          {true, true} ->
                              {ok, #fileattributes{size = FileSize}} = logical_files_manager:getfileattr(File),
                              WriteEvent = [{"type", "write_event"}, {"user_dn", fslogic_context:get_user_dn()},
                                  {"bytes", Res}, {"blocks", [{FileSize, Res}]}],
                              gen_server:call(?Dispatcher_Name, {cluster_rengine, 1, {event_arrived, WriteEvent}}),
                              WriteEventStats = [{"type", "write_for_stats"}, {"user_dn", fslogic_context:get_user_dn()},
                                  {"bytes", Res}, {"blocks", [{FileSize, Res}]}],
                              gen_server:call(?Dispatcher_Name, {cluster_rengine, 1, {event_arrived, WriteEventStats}});
                          _ ->
                              ok
                      end,
  
negative.code:                     %% TODO - check if asynchronous processing needed
                      case {is_integer(Res), event_production_enabled("write_event"), EventPolicy} of
                          {true, true, generate_events} ->
                              % async infrom other providers about modification
                              apply(fun() -> mark_as_modified(File, Offset, byte_size(Buf)) end,[]), %todo get this info from events
  
                              WriteEvent = [{"type", "write_event"}, {"user_dn", fslogic_context:get_user_dn()},
                                  {"count", Res}, {"blocks", [{Offset, Res}]}],
                              gen_server:call(?Dispatcher_Name, {cluster_rengine, 1, {event_arrived, WriteEvent}}),
  