- small fix to catch the right exception
- exception handling