Use try-with-resources