It seems the "error 313" is related to SIM failure... However, did you check the dial-number of your messaging-center (in SMS app, choose the "settings" item in contextual menu). Check on the net if the number is the good one with your wireless carrier.
You could power off your phone, remove...