try-with-resources support