Move circuit checking utils to the utilities module.
Emulate CLI when running the dbg script