fix app crash when SD card is unmounted