Corrupted AVI Raw files
So, I solved the problem by dividing the animation into pieces and gradually rendering these parts. Then I will just grab these pieces in Adobe Premiere Pro and join them together.
When you search for maximum size of AVI, it outputs 2 GB. That's most likely why the files above this limit are corrupted.