factor-out variable scope tracking
step2
include niceness
check for "log" variable presence