Changed to use Exceptions instead of exit().
Remove special settings for stacktrace and exit on failure.