remove unused variable, fix some comments & log outputs