refactoring: try-with-resources