adding some comments and remove typo in closing sdcard file