Adapted code to use the new Arduino SD Library