changed up exception type for less-volatile throw; added write(), open(), and close() for file::stream constructor dodging