fixed sending sms/writing to file bug