Replace TODOs with error logging