Following WE API recommendation to get the edit session correctly. Added debug output to show whether or not top/bottom locations are identified.