Added optional raven/sentry support. Added debug mode.