Added a lot more debug output.