Fixed initialization of FileStream

Fixed the initialization of the read-only flag.