Updated the condition for skipping the local storage