Graceful handling of application crashes