fix some logging bug and play loop for level 4