diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index bcbc2ce..3d48f4f 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -1157,6 +1157,13 @@
 
        stopRecording();
 
+       if (!Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
+            Log.e(LOGTAG, "startRecording, no external storage available");
+            return false;
+       }
+
+        if (!updateAndShowStorageHint())
+            return false;
         long maxFileSize = mStorageSpace - LOW_STORAGE_THRESHOLD;
         if(FmSharedPreferences.getRecordDuration() !=
             FmSharedPreferences.RECORD_DUR_INDEX_3_VAL) {
@@ -1172,7 +1179,7 @@
 
         }
 
-        mStoragePath = getApplicationContext().getFilesDir();;
+        mStoragePath = Environment.getExternalStorageDirectory();
         Log.d(LOGTAG, "mStoragePath " + mStoragePath);
         if (null == mStoragePath) {
             Log.e(LOGTAG, "External Storage Directory is null");
@@ -1183,10 +1190,10 @@
         File sampleDir = null;
         if (!"".equals(getResources().getString(R.string.def_fmRecord_savePath))) {
             String fmRecordSavePath = getResources().getString(R.string.def_fmRecord_savePath);
-            sampleDir = new File(getApplicationContext().getFilesDir().getPath().toString()
+            sampleDir = new File(Environment.getExternalStorageDirectory().toString()
                     + fmRecordSavePath);
         } else {
-            sampleDir = new File(getApplicationContext().getFilesDir().getAbsolutePath()
+            sampleDir = new File(Environment.getExternalStorageDirectory().getAbsolutePath()
                     + "/FMRecording");
         }
 
@@ -1264,6 +1271,7 @@
                      if (mFmRecordingOn) {
                          stopRecording();
                      }
+                     updateAndShowStorageHint();
                  }
              }
         });
@@ -1296,6 +1304,7 @@
        String state = Environment.getExternalStorageState(mStoragePath);
        Log.d(LOGTAG, "storage state is " + state);
 
+       if (Environment.MEDIA_MOUNTED.equals(state)) {
           try {
                this.addToMediaDB(mSampleFile);
                Toast.makeText(this,getString(R.string.save_record_file,
@@ -1304,6 +1313,10 @@
           } catch(Exception e) {
                e.printStackTrace();
           }
+       } else {
+           Log.e(LOGTAG, "SD card must have removed during recording. ");
+           Toast.makeText(this, "Recording aborted", Toast.LENGTH_SHORT).show();
+       }
        try {
            if((mServiceInUse) && (mCallbacks != null) ) {
                mCallbacks.onRecordingStopped();
