Added lots of console messages to debug.