Added count check to see sql query result is not empty and if empty throw exception for both location and offloading customer code segments