diff --git a/data.cpp b/data.cpp
index bf6e33b..e6f1ac0 100755
--- a/data.cpp
+++ b/data.cpp
@@ -273,44 +273,6 @@
 	return 0;
 }
 
-int DataManager::LoadPersistValues(void)
-{
-	static bool loaded = false;
-	string dev_id;
-
-	// Only run this function once, and make sure normal settings file has not yet been read
-	if (loaded || !mBackingFile.empty() || !TWFunc::Path_Exists(PERSIST_SETTINGS_FILE))
-		return -1;
-
-	LOGINFO("Attempt to load settings from /persist settings file...\n");
-
-	if (!mInitialized)
-		SetDefaultValues();
-
-	GetValue("device_id", dev_id);
-	mPersist.SetFile(PERSIST_SETTINGS_FILE);
-	mPersist.SetFileVersion(FILE_VERSION);
-
-	// Read in the file, if possible
-	pthread_mutex_lock(&m_valuesLock);
-	mPersist.LoadValues();
-
-#ifndef TW_NO_SCREEN_TIMEOUT
-	blankTimer.setTime(mPersist.GetIntValue("tw_screen_timeout_secs"));
-#endif
-
-	update_tz_environment_variables();
-	TWFunc::Set_Brightness(GetStrValue("tw_brightness"));
-
-	pthread_mutex_unlock(&m_valuesLock);
-
-	/* Don't set storage nor backup paths this early */
-
-	loaded = true;
-
-	return 0;
-}
-
 int DataManager::Flush()
 {
 	return SaveValues();
@@ -319,15 +281,6 @@
 int DataManager::SaveValues()
 {
 #ifndef TW_OEM_BUILD
-	if (PartitionManager.Mount_By_Path("/persist", false)) {
-		mPersist.SetFile(PERSIST_SETTINGS_FILE);
-		mPersist.SetFileVersion(FILE_VERSION);
-		pthread_mutex_lock(&m_valuesLock);
-		mPersist.SaveValues();
-		pthread_mutex_unlock(&m_valuesLock);
-		LOGINFO("Saved settings file values to %s\n", PERSIST_SETTINGS_FILE);
-	}
-
 	if (mBackingFile.empty())
 		return -1;
 
diff --git a/data.hpp b/data.hpp
index 4770ed5..bb73c41 100755
--- a/data.hpp
+++ b/data.hpp
@@ -23,8 +23,6 @@
 #include <pthread.h>
 #include "infomanager.hpp"
 
-#define PERSIST_SETTINGS_FILE  "/persist/.twrps"
-
 using namespace std;
 
 class DataManager
diff --git a/partition.cpp b/partition.cpp
index 82cb944..f753fdb 100755
--- a/partition.cpp
+++ b/partition.cpp
@@ -605,7 +605,6 @@
 		bool mounted = Is_Mounted();
 		if (mounted || Mount(false)) {
 			// Read the backup settings file
-			DataManager::LoadPersistValues();
 			TWFunc::Fixup_Time_On_Boot("/persist/time/");
 			if (!mounted)
 				UnMount(false);
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index ae1d133..2ac4c95 100755
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -761,7 +761,7 @@
 	PartitionManager.Mount_By_Path(src, false);
 	PartitionManager.Mount_By_Path(dst, false);
 	if (!Path_Exists(src)) {
-		LOGINFO("Unable to find source file %s\n", src.c_str());
+		LOGINFO("Path %s does not exist. Unable to copy %s\n", src.c_str(), dst.c_str());
 		return -1;
 	}
 	std::ifstream srcfile(src.c_str(), ios::binary);
@@ -1250,11 +1250,8 @@
 std::string TWFunc::get_log_dir() {
 	if (PartitionManager.Find_Partition_By_Path(CACHE_LOGS_DIR) == NULL) {
 		if (PartitionManager.Find_Partition_By_Path(DATA_LOGS_DIR) == NULL) {
-			if (PartitionManager.Find_Partition_By_Path(PERSIST_LOGS_DIR) == NULL) {
-				LOGINFO("Unable to find a directory to store TWRP logs.");
-				return "";
-			}
-			return PERSIST_LOGS_DIR;
+			LOGINFO("Unable to find a directory to store TWRP logs.");
+			return "";
 		} else {
 			return DATA_LOGS_DIR;
 		}
diff --git a/twrp-functions.hpp b/twrp-functions.hpp
index 9715d78..d185398 100755
--- a/twrp-functions.hpp
+++ b/twrp-functions.hpp
@@ -38,7 +38,6 @@
 
 #define CACHE_LOGS_DIR "/cache/"		// For devices with a dedicated cache partition
 #define DATA_LOGS_DIR "/data/"			// For devices that do not have a dedicated cache partition
-#define PERSIST_LOGS_DIR "/persist/"	// For devices with neither cache or dedicated data partition
 
 typedef enum
 {
