Using try-with-resources