switch log to debug