adding rudimentary logging