Add task search debug logging.

Add verbose logging to task search functions to aid debugging.