Added debug log lines into catch statements
Merge pull request #408 from godarklight/debug-logging

Added debug log lines into catch statements