Log module issue fixed

Fixed log.py didn't wirte log into log files.