Debug check?

    if (act.isInDebugMode()) {
            act.getDb().beginTransaction();
    }