Clear dmesg per test run (allows easier debugging) - fixed control flow bug