Updated to get_hashes

get_hashes now strips \n\r from the end of results leaving spaces

added error checking for empty results