Fix tests, there is no race condition. Add debug_log(fmt, ...) and start debug logging things