may be try-with-resources?