Add some more try-catch statements, make stack traces more useful