Add test for bad return code to tool