started using the log system instead of debug