Try with resources