add mutex for log