File open/close shouldn't be in a file called 'stream'.