caching results

cache Statistics
handling errors when R does not execute very well