This better error is only useful for this test. Is there a better place inside the main_loop() for this?