improved the log system