[binder.py] moved code inside try-except block