Added some debugging functions