Reverted head to before the logger was created. this is just post the expansion of the docstring and the addition of the comments generation. I have just commented out all print statements