Added rudimentary logging to provide some DEBUG info