Why are you using the class finalizer to close the file?

Check out the 'using' block syntax.