File's open mode wasn't set to a valid value
The value supplied for the file's open mode was not valid. The following table shows valid values for the OpenMode enumeration.
To correct this error
Verify the value being supplied for the file's open mode.