anchor.diff:              % there was race with creating file by lfm
               % file will be imported with suffix
               FileName2 = ?IMPORTED_CONFLICTING_FILE_NAME(FileName),
  -            FileMetaDoc2 = file_meta:new_doc(FileUuid, FileName2, file_meta:type(Mode),
  -                Mode band 8#1777, OwnerId, ParentUuid, SpaceId),
  +            FileMetaDoc2 = file_meta:new_doc(FileUuid, FileName2, file_meta:type(Mode), Mode band 8#1777,
  +                OwnerId, ParentUuid, SpaceId),
               {ok, FileUuid} = file_meta:create({uuid, ParentUuid}, FileMetaDoc2),
               {ok, FileMetaDoc2};
           {ok, FileUuid} ->
  
positive.code: %%-------------------------------------------------------------------
  %% @private
  %% @doc
  %% This functions import the file, if it hasn't been synchronized yet.
  %% It checks whether file that is to be imported is still visible on
  %% the storage.
  
negative.code:             {error, Reason}
      end.
  
  
  -spec create_missing_parent(storage_file_ctx:ctx(), info()) ->
      {result(), file_ctx:ctx()} | {error, term()}.
  create_missing_parent(StorageFileCtx, Info = #{parent_ctx := ParentCtx}) ->
      try
          create_missing_parent_unsafe(StorageFileCtx, Info)
      catch
          throw:?ENOENT ->
              cleanup_file(ParentCtx, StorageFileCtx),
              {error, ?ENOENT};
          Error:Reason ->
              FileName = storage_file_ctx:get_file_name_const(StorageFileCtx),
              SpaceId = storage_file_ctx:get_space_id_const(StorageFileCtx),
              StorageId = storage_file_ctx:get_storage_id_const(StorageFileCtx),
              ?error_stacktrace("importing file ~p on storage ~p in space ~p failed due to ~w:~w",
                  [FileName, StorageId, SpaceId, Error, Reason]),
              cleanup_file(ParentCtx, StorageFileCtx),
              {error, Reason}
      end.
  
  
  -spec cleanup_file(file_ctx:ctx(), storage_file_ctx:ctx()) -> ok.
  cleanup_file(ParentCtx, StorageFileCtx) ->
      UserCtx = user_ctx:new(?ROOT_SESS_ID),
  