I noticed this problem when the file size is bigegr than 2G and smaller than 4G.
I didn't tryed it with > 4G
One of the tests i was reading data from the file and checking the size and the other test i was increasing the file size from 2G to 4G and checking also the file size.
Both gave me the problem.

Thanks for your feedback Davec