call callback outside try/catch