minor fixes on code style
small log system added