[FIX] catch exception in debug mode
[NOP] add debug statements
Merge pull request #1039 from hroest/fix/debug_fix

Fix/debug fix