fixed critical bug that caused measurement-statistic service to crash if
a measurement was recorded
fixed permissions to send sms and cleanup sms message