Fixed bug in FileSave::writeStream.