Use try-with-resource to close filestream