Fix up try-resource usage