fixed exception scope issue; updated example app