Adding some looging for debugging