init sentry in a cleaner and more failsafe way