Add error handling to clo_sort_get_localmem_usage()