better error message in slurp() function
tests for <cb>