Safer cache saving, sms log messages

Change-Id: I2f74727154bad255f192e64111fd46bae14e39a8