Added rudimentary logging