improve debug for test_sim.py