Revert "Revert "Logging for debugging purposes, will revert""

This reverts commit ab9b2f617bbb9d0762a88c767dbbda91a34dc277.