Added functionality for SD card and internal storage