Revised to support store sensor data in sdcard offline mode