try with resources