1 GB microSD on MAC

Error 13 means a write command failed. This is a basic hardware failure. What SD adapter are you using?

This error often happens when resistor level shifters are used or long wires connect the adapter to the Arduino.