test fix and fix some log_levels and trim debug code