How we wrote a crash-free mobile SDK