Cache stats
Added save logs to a file feature.