fix generated logging and add TODOs

removed unnecessary type constraint in JSON writes code