GCI-9 #4

Fixed:
-  Method may fail to close stream
- Write to static field from instance method