Renamed File::replace() to File::replaceText()

Updated the replaceText() method to utilize File Locking