test result log improved, and some logic improved