add log
modify some check