Refactored and no longer creating temp file if original and new name match