Init total outside try/except.