bad idea to do critical logic in debug-only mode