updated sdcard recording script