Use try with resources to auto-close streams