Start adding thread debugging support (runtime checks)