do file sync when writing first record to ensure proper file relative offset (IDEA-106306)
simplier code and less temp objects allocations: prebuild list of index ids used for particular file type indexing and use the list