move decoing phase into try/catch