Finish #7: add log system