Added some messages to aid debugging.