Could use try-with-resources?