Added some debugging messages. I should add a simple "logger"