address comments

1) add try-with-resource for timeStat
2) update tests to reflect changes