Bug fixes in SYSTATFileStream
First full working version